3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { public static $static = 'Parent class'; public static method staticVariable() { echo static::$static; } } ParentClass::staticVariable();
Output for 5.4.18
Parse error: syntax error, unexpected 'method' (T_STRING), expecting variable (T_VARIABLE) in /in/gEC0T on line 9
Process exited with code 255.
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'method' (T_STRING), expecting variable (T_VARIABLE) in /in/uWZVr on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/uWZVr on line 9
Process exited with code 255.

preferences:
177.83 ms | 1395 KiB | 54 Q