title: PHP string console parameters to array
body: <p>I would like to know how I could transform the given string into the specified array:</p>
  
  <p><strong>String</strong></p>
  
  <pre><code>all ("hi there \(option\)", (this, that), other) another
  </code></pre>
  
  <p><strong>Result wanted (Array)</strong></p>
  
  <pre><code>[0] =&gt; all,
  [1] =&gt; Array(
      [0] =&gt; "hi there \(option\)",
      [1] =&gt; Array(
          [0] =&gt; this,
          [1] =&gt; that
      ),
      [2] =&gt; other
  ),
  [2] =&gt; another
  </code></pre>
  
  <p>This is used for a kind of console that I'm making on PHP.
  I tried to use <code>preg_match_all</code> but, I don't know how I could find parentheses inside parentheses in order to "make arrays inside arrays".</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>All other characters that are not specified on the example should be treated as <code>String</code>.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>I forgot to mention that all parameter's outside the parentheses should be detected by the <code>space</code> character.</p>