- Output for 7.1.0 - 7.1.14, 7.2.0 - 7.2.2
- Parse error: syntax error, unexpected ')', expecting '(' in /in/agv6p on line 13
Process exited with code 255.
<?php
class Person {
private const NAME = 'Serkan';
}
class PhpSpec
{
public function __construct()
{
$name = 'NAME';
$func = function() use ($name) {
return constant(self::{$name});
};
$closure = $func->bindTo(new Person());
echo $closure();
}
}
$spe = new PhpSpec();