run code in 150+ php & hhvm versions
Bugs & Features
<?php class Another{} namespace My\Full\Classname; class Another{} namespace Waa; use My\Full\Classname as Another; $obj = new Another; // instantiates object of class My\Full\Classname $a = 'Another'; $obj = new $a; // instantiates object of class Another ?>
Output for 5.3.0 - 5.4.2
Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/3a0Kd on line 5
Process exited with code 255.