xref: /PHP-8.2/tests/basic/012.phpt (revision f8d79582)
1--TEST--
2Testing $argc and $argv handling (cli)
3--INI--
4register_argc_argv=1
5variables_order=GPS
6--ARGS--
7ab cd ef 123 test
8--FILE--
9<?php
10$argc = $_SERVER['argc'];
11$argv = $_SERVER['argv'];
12
13for ($i=1; $i<$argc; $i++) {
14    echo ($i-1).": ".$argv[$i]."\n";
15}
16
17?>
18--EXPECT--
190: ab
201: cd
212: ef
223: 123
234: test
24