title: What are some good PHP performance tips?
body: <p>I've heard of some performance tips for PHP such as using <code>strtr()</code> over <code>str_replace()</code> over <code>preg_replace()</code> depending on the situation. </p>
  
  <p>As far as using certain functions over others, and code style, what are some of the performance tips that you know of?</p>
  
  <p>Edit: I'm not talking about use of things that make code less readable, like <code>!isset($foo{5})</code> over <code>strlen($foo) &lt; 5</code>, I'm talking about things like using preg_ functions over ereg_ functions for regex.</p>
  
  <p>Edit: The reason I ask this is not for nitpicking over when to optimize, but to get a general idea of what tends to be most efficient in a limited set of alternatives. For instance, checking if a mysql statement returned an error is arguably better practice than suppressing the errors to begin with.</p>