mirror of
https://github.com/php/php-src.git
synced 2024-09-28 13:26:11 +00:00
00c81b0e49
$argc and $argv global variables are registered only in CLI mode and under $_SERVER[] in other case. (This is done because register_globals was removed and assumed - off).
21 lines
309 B
PHP
21 lines
309 B
PHP
--TEST--
|
|
Testing $argc and $argv handling (GET)
|
|
--SKIPIF--
|
|
<?php if (php_sapi_name()=='cli') echo 'skip'; ?>
|
|
--INI--
|
|
register_argc_argv=1
|
|
--GET--
|
|
ab+cd+ef+123+test
|
|
--FILE--
|
|
<?php
|
|
for ($i=0; $i<$_SERVER['argc']; $i++) {
|
|
echo "$i: ".$_SERVER['argv'][$i]."\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
0: ab
|
|
1: cd
|
|
2: ef
|
|
3: 123
|
|
4: test
|