preg_replace/str_replace Re: [PEAR-DEV] Re: IT[X] fork, round 2
| From: | Alexey Borzov | Date: | Wed, 12 Feb 2003 20:35:49 +0000 |
| Subject: | preg_replace/str_replace Re: [PEAR-DEV] Re: IT[X] fork, round 2 | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13206@lists.php.net to get a copy of this message | ||
Pierre-Alain Joye wrote:
preg_replace('@{foo}@', 'bar'); and str_replace('{foo}', 'bar'); except that the first would fuck up if 'bar' contains '$1' and the second one would not.To me, being practical, we have to go with both. I think using something like setVarPReg/setVarStrReplace and/or flags could stop that discussion. And i guess a flag defaulting to preg would not break BC.Exactly. I just told that to Alexy a few hours ago by 'do not replace preg by default' :-). This is the only way to do not break BC. I'm sick and tired of this. Please explain without using the BC and BS argument, what's the difference in behaviour between: