3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php use Other\Hierarchy\TheOtherNamespace; $a = function(Some\Random\Namespace $b) { }; $b = function(TheOtherNamespace $c) { }; $handlers = [$a, $b]; foreach ($handlers as $handler) { $r = new ReflectionFunction($handler); $p = $r->getParameters(); var_dump($p[0]->getClass()); }
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'Namespace' (T_NAMESPACE), expecting identifier (T_STRING) in /in/sJ5eH on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in /in/sJ5eH on line 5
Process exited with code 255.