You could use what sep16 on php.net recommends:
<?php
parse_str(implode('&', array_slice($argv, 1)), $_GET);
?>
It behaves exactly like you'd expect with cgi-php.
$ php -f myfile.php type=daily a=1 b[]=2 b[]=3
will set $_GET['type']
to 'daily'
, $_GET['a']
to '1'
and $_GET['b']
to array('2', '3')
.