- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
- Parse error: syntax error, unexpected ':', expecting ',' or ';' in /in/SVtLr on line 21
Process exited with code 255.
<?php
class A {
public static function foo() {
$f = function() {
echo get_called_class()."\n";
echo static::$bar."\n";
};
$f();
echo get_called_class()."\n";
echo static::$bar."\n";
}
}
class B extends A {
static public $bar = 'ss';
}
B::foo();
echo get_called_class():"\n";