3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace My\Full\Classname; class Another{} namespace Waa; class Another{} 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: Cannot use My\Full\Classname as Another because the name is already in use in /in/IFDts on line 8
Process exited with code 255.