Description
The following code:
<?phpnamespaceFoo;
class Bar
{
publicstaticfunctiontestClass(): \Closure
{
returnfunction(){};
}
}
functiontestFunc(): \Closure
{
returnfunction(){};
}
var_dump((new \ReflectionFunction(Bar::testClass()))->getNamespaceName());
var_dump((new \ReflectionFunction(testFunc()))->getNamespaceName());Resulted in this output:
string(12) "{closure:Foo"
string(12) "{closure:Foo"
But I expected this output instead:
string(3) "Foo"
string(3) "Foo"
https://3v4l.org/QjjJK/rfc
PHP Version
PHP 8.4.0RC1
Operating System
No response
Description
The following code:
Resulted in this output:
But I expected this output instead:
https://3v4l.org/QjjJK/rfc
PHP Version
PHP 8.4.0RC1
Operating System
No response