3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function myfunction() { $string=argv[1]; print $string; } myfunction("Hello. World!"); ?>
based on IGJbU
Output for 7.2.0
Warning: Use of undefined constant argv - assumed 'argv' (this will throw an Error in a future version of PHP) in /in/8IhJ4 on line 4 r
Output for 5.6.8 - 7.1.10
Notice: Use of undefined constant argv - assumed 'argv' in /in/8IhJ4 on line 4 r
Output for 5.3.19 - 5.5.35
Parse error: syntax error, unexpected '[' in /in/8IhJ4 on line 4
Process exited with code 255.