Re: Re: str_ireplace vs. stri_replace
| From: | Ilia A. | Date: | Fri, 31 Jan 2003 03:13:16 +0000 |
| Subject: | Re: Re: str_ireplace vs. stri_replace | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-93830@lists.php.net to get a copy of this message | ||
> 1. Not all users will notice the extra parameter easily. Will take some
> time.
This modification will not appear until PHP 5 is released, by then this extra
parameter (hopefully) will be well documented and people will be aware that
it exists. Adding extra code, which virtually does the same thing IMHO is
pointless and only creates a messy code that is difficult to maintain at a
future point.
>
> 2. If some users made their own function called stri_replace, this is
> nothing that should be stopping from implementing it officially. In fact,
> to fix it would be as easy as encapsuling the function declaration in
You are correct in the event of a user writing a new function, however
consider what will happen if we are dealing with a old code, especially if it
is no longer used just by the author but rather by a variety of other people
not familiar with PHP code. The result is that after they or their ISPs
upgrade to new PHP their scripts will stop working.
Ilia