3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { static $asdf = 1+2; } echo A::asdf;
based on MGQko
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Undefined class constant 'asdf' in /in/I4NBB:8 Stack trace: #0 {main} thrown in /in/I4NBB on line 8
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Fatal error: Undefined class constant 'asdf' in /in/I4NBB on line 8
Process exited with code 255.
Output for 5.3.20 - 5.5.35
Parse error: syntax error, unexpected '+', expecting ',' or ';' in /in/I4NBB on line 6
Process exited with code 255.