title: Check if a string starts with certain words, and split it if it is
body: <pre><code>$str = 'foooo'; // &lt;- true; how can I get 'foo' + 'oo' ?
  $words = array(  
    'foo',
    'oo'
  );
  </code></pre>
  
  <p>What's the fastest way I could find out if <code>$str</code> starts with one of the words from the array, and split it if it does?</p>