mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
21 lines
348 B
PHP
21 lines
348 B
PHP
--TEST--
|
|
ReflectionFunction::getShortName() returns the full name for closures defined in namespaces.
|
|
--FILE--
|
|
<?php
|
|
namespace Foo;
|
|
|
|
class Bar {
|
|
public function baz() {
|
|
return function () {
|
|
|
|
};
|
|
}
|
|
}
|
|
|
|
$c = (new Bar())->baz();
|
|
$r = new \ReflectionFunction($c);
|
|
var_dump($r->getShortName());
|
|
?>
|
|
--EXPECT--
|
|
string(26) "{closure:Foo\Bar::baz():6}"
|