Hi!

It also isn't any shorter:

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

  vs.

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

Doesn't substr allocate new string for ".php"? Then endswith can have one advantage of not requiring any new allocations. Not sure it's enough to add it, but a point here to consider.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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

Reply via email to