title: PHP Is this more efficient or not worth the bother?
body: <p>We have ~20000 folders stored on our LAN in a master folder I'll call "folder" these are subdivided into groups of 1000 in folders named 1000-1999, 2000-2999 etc... if a folder exists - say 5416, I want to return a link to it.</p>
  
  <p>My question is:</p>
  
  <p>Originally I was spinning through the items in "folder", if they were a directory, I exploded the current folder name to obtain lower and upper bounds, compared whether the folder I was searching for (5416) fell within the upper and lower bounds of the current folder and checked to see if 5416 existed within it.</p>
  
  <p>I'm not having any performance issues but it occurred to me that maybe exploding the strings and doing the comparisons was more computationally expensive than just using PHP's file_exists.</p>
  
  <p>Thoughts?      </p>