On Thu, 30 Jan 2003, Gabor Hojtsy wrote:

> >   Added files:                 
> >     /phpdoc/en/reference/strings/functions  str-ireplace.xml 
> > 
> >   Modified files:              
> >     /phpdoc/en/reference/strings/functions  str-replace.xml 
> >   Log:
> >   New function str_ireplace()
> 
> I guess you copied str_replace's docs to str_ireplace, and modified a 
> few sentences to note that it is case insensitive. Wouldn't it be better 
> to add just that:
> 
>    This function is the case insensitive version of 
> <function>str_replace</function>.
> 
> This would make updates more easier. I guess the PHP source also 
> implements this with some internal parameter to a common function...

If we started doing this, we'd have to do it for many
functions such as stristr() and eregi_replace() which
would be a little weird and inconsistent.  I think we
should leave them separate.

Also there are some subtle differences, such as comparing
it to eregi_replace instead of ereg_replace and there is
no need for that 4.0.5 <note>, the see alsos, and the
example.  BTW, that 3.0.5-.8 note should be deleted, we
don't document bugs.

On a related note, I think the function should be called
stri_replace instead as that goes along with stristr and
eregi_replace better but that's not our place and I 
guess it also makes sense to have str_ like the others
but... whatever :)

Regards,
Philip


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to