3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test { function sqrt($arg=null) { return 'test'; } } namespace Second { function sqrt($arg=null) { return 'second'; } } namespace { use function Test\sqrt; use function Second\sqrt; echo sqrt(); }
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Fatal error: Cannot use function Second\sqrt as sqrt because the name is already in use in /in/Oitfi on line 22
Process exited with code 255.

preferences:
183.4 ms | 1395 KiB | 36 Q