3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('\\true', false); if (true) { echo "TRUE"; } else { echo "FALSE!!!"; } namespace Foo; define('Foo\\true', false); if (true) { echo "TRUE"; } else { echo "FALSE!!!"; }
Output for 5.3.0 - 5.3.24, 5.3.26 - 5.4.16
Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/1fMAI on line 10
Process exited with code 255.
Output for 5.3.25
Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/C7dSE on line 10
Process exited with code 255.