xref: /PHP-7.0/tests/basic/012.phpt (revision febee112)
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$argc = $_SERVER['argc'];
13$argv = $_SERVER['argv'];
14
15for ($i=1; $i<$argc; $i++) {
16	echo ($i-1).": ".$argv[$i]."\n";
17}
18
19?>
20--EXPECT--
210: ab
221: cd
232: ef
243: 123
254: test
26