Closed
Description
Description
The following code:
namespace App;
class Foo
{
public function baz(string $arg = new Foo() . Foo::BAR)
{
}
}
$r = new \ReflectionMethod(Foo::class, 'baz');
echo $r->getParameters()[0];
Resulted in this output:
Parameter #0 [ <optional> string $arg = new \App\Foo() . App\Foo::BAR ]
But I expected this output instead:
Parameter #0 [ <optional> string $arg = new \App\Foo() . \App\Foo::BAR ]
Originally reported at doctrine/common#983
PHP Version
8.1+
Operating System
No response