3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { const CONSTANT = 'the constant'; static $CONSTANT = 'the static variable'; } $foo = '$CONSTANT'; echo FOO::{$foo};
Output for 5.4.0 - 5.4.13
Parse error: syntax error, unexpected ';', expecting '(' in /in/EG99Y on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.23
Parse error: syntax error, unexpected '{', expecting T_STRING or T_VARIABLE or '$' in /in/EG99Y on line 9
Process exited with code 255.