Skip to content

ReflectionParameter::getDefaultValueConstantName() returns name on non-constants #3828

@SiebelsTim

Description

@SiebelsTim
define("K", 11);
function a($a = 1, $b = 'hi', $c = K) {

}

$r = new ReflectionFunction('a');

foreach($r->getParameters() as $key=>$val) {
  var_dump($val->getDefaultValueConstantName());
}

http://3v4l.org/lGLlf

Relevant for #3812

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions