[PHP-DEV] Re: [PHP4BETA] strchr() From: Jon Parise (jon <email protected>)
Date: 04/23/00

On Sun, Apr 23, 2000 at 11:21:26AM +0300, Andi Gutmans wrote:

> Write now the PHP function strchr() is aliased to strstr() for
> some odd reason. It could be implemented much faster as strchr()
> just looks for a character within a string and not a string
> within a string. Do you guys think people are using strchr()
> where strstr() should be used, and will they get bitten if its
> behavior is changed to do "exactly but not more" of what it
> should do?

It should be implemented correctly and the change well documented.
If people are currently using it incorrectly, they may be
inconvenienced, but I'm sure no one will argue with the speed
improvement of a real strchr().

-- 
Jon Parise (jon <email protected>)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>