3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = "asd"; namespace { function strlen($str) { return "overriden" . \strlen($str); } echo strlen($foo); }
based on 3SL1h
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/Jfh8P 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/Jfh8P on line 5
Process exited with code 255.