3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace www; class Base { public function ec() { echo "1111";} } class A extends namespace\Base {} namespace ttt; class Base { public function ec() { echo "222";} } use \www\A as ttt\A; class B extends \www\A {} $a = new \ttt\B(); $a->ec();
Output for 5.4.0 - 5.4.18
Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting ',' or ';' in /in/LpnRe on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting ',' or ';' in /in/LpnRe on line 12
Process exited with code 255.