On Thu, 30 Jan 2003 17:11:53 -0500 "Ilia A." <[EMAIL PROTECTED]> wrote:
> On January 30, 2003 04:55 pm, Jon Parise wrote: > > On Thu, Jan 30, 2003 at 01:44:27PM -0800, Sara Golemon wrote: > > > You're not the first to voice this opinion. *I* feel str_ireplace is > > > better as it follows the naming convention of <module>_<function>. > > > Others feel stri_replace is better as that follows eregi_replace's style. > > > I have no trouble going with whatever the majority feels is best. > > > > Get rid of stri_replace() and/or str_ireplace() and just add a fourth > > optional parameter to str_replace() to control case-sensitivity. > > +1 from me too, stri_replace sound like a function some users may have > implemented them selves and we could end up breaking their code by > introducing it. Although this is not my area of expertise, I would like to express my negative opinion towards solving the problems with extra parameters. Why? 1. Not all users will notice the extra parameter easily. Will take some time. 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 if(!function_exists('stri_replace')) { function stri_replace($str = '') { // ... user code } } ... which means acting on a centralized object - two lines of code after an upgrade. 3. There is no reason to believe that this function was already used so many times - as noted before, many have simply used regex. Look at this: http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=stri_replace+-php.net only 17 results. Of course, the use of this name might be much more, but still - gives an idea of "not such used" user function. Thus, my conclusion is that I doubt there is any gain of stability by solving this issue with a parameter instead of an intuitive function. -- Maxim Maletsky [EMAIL PROTECTED] -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php