3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $argv = array($argv[0], '-xfoo', '-y', 'foo', 'arg1', 'arg2', 'arg3'); var_dump(getopt('y:x:'));
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
array(0) { }
Output for hhvm-3.10.0 - 3.12.0
array(2) { ["x"]=> string(3) "foo" ["y"]=> string(3) "foo" }
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: argv in /in/UtmmR on line 3 array(0) { }