title: What is the efficiency of strlen() in PHP?
body: <p>Does using <code>strlen</code> actually count the number of bytes in the string by iterating through the string, or does it simple return the value of an already calculated length of the string from an index?</p>
  
  <p>The reason for my question is because I have a choice to store pre-calculated values of very long strings for a speed-sensitive script, or I could just use the <code>strlen</code> function and save myself coding time.</p>
  
  <p>But I would actually like to know how <code>strlen</code> works as I tend to rely on it a lot, and perhaps this is not a good idea?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>See my benchmark below.</p>