Re: Re: IT[X] status update and a reminder

From: Date: Sun, 23 Feb 2003 17:07:04 +0000
Subject: Re: Re: IT[X] status update and a reminder
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13650@lists.php.net to get a copy of this message
Arnaud Limbourg wrote:
Hmm, str_replace() is a lot faster than preg_replace() and if using str_replace() really fixes the bug, it should be the default imo.
<general question> What is the reason for using preg_replace ? </general question>
My best guess is the following: Until PHP 4.0.5 str_replace did not accept arrays as parameters, while preg_replace did, thus it was used there. It is also interesting to note, that until PHP 4.0.4 preg_replace did not consider $1 in replacements as a backreference, and after that the problem surfaced... So it's rather a PHP BC problem than an HTML_Template_IT's one. :] References: http://www.php.net/manual/en/function.str-replace.php http://www.php.net/manual/en/function.preg-replace.php

« previous php.pear.dev (#13650) next »