3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php hallo(); namespace Thijs; function hallo() { echo "Hallo, Thijs"; } namespace Hans; function hallo() { echo "Hallo, Hans"; }
Output for 7.0.1 - 7.0.2
Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /in/v51ep on line 5
Process exited with code 255.
Output for 5.3.21 - 7.0.0
Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/v51ep on line 5
Process exited with code 255.