Annotation of embedaddon/php/tests/basic/012.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Testing $argc and $argv handling (cli)
                      3: --SKIPIF--
                      4: <?php if(php_sapi_name()!='cli') echo 'skip'; ?>
                      5: --INI--
                      6: register_argc_argv=1
                      7: variables_order=GPS
                      8: --ARGS--
                      9: ab cd ef 123 test
                     10: --FILE--
                     11: <?php 
1.1.1.2 ! misho      12: $argc = $_SERVER['argc'];
        !            13: $argv = $_SERVER['argv'];
1.1       misho      14: 
                     15: for ($i=1; $i<$argc; $i++) {
                     16:        echo ($i-1).": ".$argv[$i]."\n";
                     17: }
                     18: 
                     19: ?>
                     20: --EXPECT--
                     21: 0: ab
                     22: 1: cd
                     23: 2: ef
                     24: 3: 123
                     25: 4: test

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>