3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { const BAR = "FOO"; public static $FOO = "BAR"; } echo Foo::BAR; echo Foo::FOO; echo Foo::$FOO;
based on YTSai
Output for 7.0.0 - 7.2.0
FOO Fatal error: Uncaught Error: Undefined class constant 'FOO' in /in/MKYLR:9 Stack trace: #0 {main} thrown in /in/MKYLR on line 9
Process exited with code 255.
Output for 5.3.21 - 5.6.28
FOO Fatal error: Undefined class constant 'FOO' in /in/MKYLR on line 9
Process exited with code 255.