3v4l.org

run code in 300+ PHP versions simultaneously
<?php define ('X', 0); namespace A { const Z = 9; define ('X', 0); } namespace B { const Z = 9; }
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.23
Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/ChCon on line 3
Process exited with code 255.

preferences:
178.98 ms | 1395 KiB | 60 Q