3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace cli { function command() {} function prompt($message, &$var, $default) {} } namespace { use cli; use function cli\prompt; cli\command(); prompt("Hey! (yN) [y]>", &$prompt, "y"); }
Output for 5.4.0 - 5.4.27
Warning: The use statement with non-compound name 'cli' has no effect in /in/cPqWn on line 9 Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING) or \\ (T_NS_SEPARATOR) in /in/cPqWn on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Warning: The use statement with non-compound name 'cli' has no effect in /in/cPqWn on line 9 Parse error: syntax error, unexpected T_FUNCTION, expecting T_STRING or T_NS_SEPARATOR in /in/cPqWn on line 10
Process exited with code 255.