<?php
class A {
function foo() {
$f = static function() {
return self::class;
};
return $f();
}
}
class B extends A {}
$b = new B;
var_dump($b->foo());
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/N8tGX on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_FUNCTION, expecting T_PAAMAYIM_NEKUDOTAYIM in /in/N8tGX on line 4
Process exited with code 255.