when compiled as an executable argument on the command line are passed in the $argv[] array and number of args in $argc
ex: testarg.php
-----8<----------8<-----
<?
echo "Number of arguments: $argc\n";
for ($i = 0; $i < $argc ; $argc++)
echo "argv[$i]=".$argv[$i]."\n";
?>
-----8<----------8<-----
when run, this script output is:
php -q testarg.php aaa bbb ccc
Number of arguments: 4
aaa
bbb
ccc
argv[0] contains the name of the script
JBL