3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public static $a = 2; } $a = new A; echo "Test ${a::a}";
based on GjZbe
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Undefined class constant 'a' in /in/TXWCQ:8 Stack trace: #0 {main} thrown in /in/TXWCQ on line 8
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Couldn't find constant a::a in /in/TXWCQ:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Couldn't find constant a::a in /in/TXWCQ:8 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Undefined class constant 'a' in /in/TXWCQ on line 8
Process exited with code 255.