Hmm, your benchmark proved your point. I initially used this method based on an [SO post][1], but it seems your right, as `substr` creates a string (and allocates the memory for one, etc) instead of just doing a quick comparison.

I'll look more into the best method for this. Thanks for the input!

[1]: http://stackoverflow.com/questions/834303/php-startswith-and-endswith-functions