Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005827 [Quercus] minor always 11-18-14 01:56 11-18-14 01:56
Reporter maxnoe View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 4.0.36
Summary 0005827: ReflectionMethod alternative constructor not supported
Description According to the php.net documentation, two constructors are supported for ReflectionMethod:

  public ReflectionMethod::__construct ( mixed $class , string $name )

and

  public ReflectionMethod::__construct ( string $class_method )

Only the first one works.
Additional Information == Steps to reproduce
Run the following code (http://3v4l.org/QoTPn): [^]

  <?php

  class AClass {
    static function aFunction() {
      $method = new \ReflectionMethod(__METHOD__);
      echo $method->getName();
    }
  }

  AClass::aFunction();

== Expected
aFunction

== Actual
Warning: function '__construct' has 2 required arguments, but only 1 were provided

== Additional info
The equivalent form works fine:
$method = new \ReflectionMethod(__CLASS__, __FUNCTION__);
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
11-18-14 01:56 maxnoe New Issue


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
26 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker