title: PHP str_replace() with a limit param?
body: <p><code>str_replace</code> replaces all occurrences of a word with a replacement.</p>
  
  <p><code>preg_replace</code> replaces occurrences of a pattern with a replacement and takes an optional limit param.</p>
  
  <p>I don't have any need for pattern matching but would like the convenience of a limit param. What should I be using?</p>