Brian Moon wrote:
Stan Vassilev | FM wrote:
I'm particularly for begins/endswith() function as I do this all over my
code and I'd appreciate the simplification and free extra performance.

I really don't mean to be rude here, but shorter and less typing !==
performance gain. The PHP string functions are very fast. And if you are
looking to improve your applications performance by using different
string functions, you are likely looking in the wrong place.

It also isn't any shorter:

  if(str_endswith($path,'.php'))

  vs.

  if(substr($path,-4)=='.php')

And there would be no performance gain since it can be done in a single call now and the code would do pretty much exactly what substr does.

-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to