xref: /PHP-5.3/tests/basic/012.phpt (revision 832ffd19)
1--TEST--
2Testing $argc and $argv handling (cli)
3--SKIPIF--
4<?php if(php_sapi_name()!='cli') echo 'skip'; ?>
5--INI--
6register_argc_argv=1
7variables_order=GPS
8--ARGS--
9ab cd ef 123 test
10--FILE--
11<?php
12
13if (!ini_get('register_globals')) {
14	$argc = $_SERVER['argc'];
15	$argv = $_SERVER['argv'];
16}
17
18for ($i=1; $i<$argc; $i++) {
19	echo ($i-1).": ".$argv[$i]."\n";
20}
21
22?>
23--EXPECT--
240: ab
251: cd
262: ef
273: 123
284: test
29