Ilia A. writes:
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.

Yes, but you are talking about a few dozen of cases forgetting thousands of newbies that are seeking for stri_replace function... They aren't guessing whether this time there a forth parameter in str_replace ...
I think a logical function set is better for consistency... especially when strstr has stristr, ereg* has eregi* and so on...
At the end, releasing PHP all of the sudden with register_globals off by default a year ago made much more damage worldwide... That was a change for PHP5, not in the middle of the releases... But, the reason was good - security.
This little change (str(i?)_replace) only asks for removing user defined functions because the official one exists... Once *ALL* PHP users passed through register_globals, I think another dozen of them can go through stri_replace "prob" :)

Maxim Maletsky
[EMAIL PROTECTED]

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



Reply via email to