Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (23 sloc) 366 Bytes
Testing $argc and $argv handling (cli)
<?php if(php_sapi_name()!='cli') echo 'skip'; ?>
ab cd ef 123 test
$argc = $_SERVER['argc'];
$argv = $_SERVER['argv'];
for ($i=1; $i<$argc; $i++) {
echo ($i-1).": ".$argv[$i]."\n";
0: ab
1: cd
2: ef
3: 123
4: test
Jump to Line
Something went wrong with that request. Please try again.