3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(time()); define('FOO', time()); class BAR{ public static BAZ = FOO; } sleep 5; print_r(BAR::BAZ);
Output for 5.4.0 - 5.4.10
Parse error: syntax error, unexpected 'BAZ' (T_STRING), expecting variable (T_VARIABLE) in /in/7nvHt on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.20
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/7nvHt on line 5
Process exited with code 255.

preferences:
169.83 ms | 1395 KiB | 39 Q