In PHP, all commandline parameter are passed to the $argv array. Following example shows how to use this array:
$op1 = $argv[1];
$op2 = $argv[2];
$sum = $op1 + $op2;
print 'Sum: ' . $sum . "\n";
print_r($argv);
$argv[1] and $argv[2] contain the passed parameters in the order they were typed. The last line prints a dump of the data where the first parameter is the name of the file.
$ php sum.php 2 3
Sum: 5
Array
(
[0] => sum.php
[1] => 2
[2] => 3
)