title: What's the most efficient test of whether a PHP string ends with another string?
body: <p>The standard PHP way to test whether a string <code>$str</code> ends with a substring <code>$test</code> is:</p>
  
  <pre><code>$endsWith = substr( $str, -strlen( $test ) ) == $test
  </code></pre>
  
  <p>Is this the fastest way?</p>