3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace cli { function command() {} function prompt() {} } 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/CEgvu on line 9 Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING) or \\ (T_NS_SEPARATOR) in /in/CEgvu 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/CEgvu on line 9 Parse error: syntax error, unexpected T_FUNCTION, expecting T_STRING or T_NS_SEPARATOR in /in/CEgvu on line 10
Process exited with code 255.

preferences:
180.61 ms | 1395 KiB | 64 Q