php get all command line arguments as associative array
<p>Is it possible to get all php command line arguments as an associative array in the format of:</p>

<pre><code>argument --option1 --option2 argument2 --option1
</code></pre>

<p>would be output as</p>

<pre><code>'arguments' =&gt; array(
    'argument' =&gt; array(
        'option1', 'option2'  
     ),
     'argument2' =&gt; array(
         'option1'
     )
)
</code></pre>

<p>but the solution should be generic</p>
