title: PHP String Decomposition
body: <p>What is the best way to decompose the following string:</p>
  
  <pre><code>$str = '/input-180x129.png'
  </code></pre>
  
  <p>Into the following:</p>
  
  <pre><code>$array = array(
      'name' =&gt; 'input',
      'width' =&gt; 180,
      'height' =&gt; 129,
      'format' =&gt; 'png',
  );
  </code></pre>