建议用
path/php -q pram.php 1 2 3 4print_r($_GET); // 得到数组,键为参数
print_r($_SERVER["argv"]); // 得到数组,值为参数。第一个元素为程序名