diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/011.phpt | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/basic/011.phpt b/tests/basic/011.phpt index 9320c16c16..8d12ea8da8 100644 --- a/tests/basic/011.phpt +++ b/tests/basic/011.phpt @@ -7,15 +7,16 @@ Testing $argc and $argv handling ab+cd+ef+123+test --FILE-- <?php - if(ini_get('register_globals') != '') { - for($i=0;$i<$argc;$i++) { - echo "$i: ".$argv[$i]."\n"; - } - } else { - for($i=0;$i<$_SERVER['argc'];$i++) { - echo "$i: ".$_SERVER['argv'][$i]."\n"; - } - } + +if (!ini_get('register_globals')) { + $argc = $_SERVER['argc']; + $argv = $_SERVER['argv']; +} + +for ($i=0; $i<$argc; $i++) { + echo "$i: ".$argv[$i]."\n"; +} + ?> --EXPECT-- 0: ab |