title: In PHP, what is the most efficient way to match a string against a list of keywords?
body: <p>I have a list of keywords, and need to check whether any of these occurs in a string. E.g.:</p>
  
  <pre><code>/* Keywords */
  Rock
  Paper
  Scissors
  
  /* Strings */
  "This town rocks!"    /* Match */
  "Paper is patient"    /* Match */
  "Hello, world!"       /* No match */
  </code></pre>
  
  <p>I could put my keywords in an array, loop through it and do a preg_match() or substr() on each iteration, but that seems a bit cpu-expensive. I've mucked aroud with regexps a bit, but without much success.</p>
  
  <p>What is the most efficient way (in terms of lean code and low CPU loads) to do this?</p>
  
  <p>Note that the comparison must be case-insensitive.</p>