3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public static function test() { return new __CLASS__; // Here comes Late Static Bindings } } class B extends A { } var_dump(get_class(B::test())); ?>
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '__CLASS__' (T_CLASS_C) in /in/NdCr5 on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_CLASS_C in /in/NdCr5 on line 5
Process exited with code 255.