3v4l.org

run code in 300+ PHP versions simultaneously
<?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.

preferences:
188.34 ms | 1386 KiB | 58 Q