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

On Sun, Apr 23, 2000 at 11:21:26AM +0300, Andi Gutmans wrote:
> Hey,
>
> 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?

    -1 for changing the function.
    +0 for implementing a optimized version if str.len is 1 for
       needle. (i don't think we'll gain a lot;-)

>
> Andi
> ---
> Andi Gutmans <andi <email protected>>
> http://www.zend.com/
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
> For additional commands, e-mail: php4beta-help <email protected>
> To contact the list administrators, e-mail: php4beta-admin <email protected>

-- 

Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

-- 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>