3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php const CONSTANT = 'GLOBAL'; namespace Foo { const CONSTANT = __NAMESPACE__; $closure = function () { return CONSTANT; } } namespace Bar { const CONSTANT = __NAMESPACE__; }
Output for 5.3.0 - 5.4.30
Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/8RjM6 on line 5
Process exited with code 255.