ID: 11448
Updated by: sniper
Old-Status: Open
Status: Bogus
Bug Type: Unknown/Other Function
Operating system: 
PHP Version: 4.0.5
Assigned To: 

Where does it say you can use function as the replacement?
You have to set it to variable first.

Previous Comments:

[2001-06-12 19:07:10] [EMAIL PROTECTED]
the following line:

$line = str_replace("pattern", Pattern(),$line);

where Pattern() is a function that returns a string.

Pattern executes everytime this code line is encountered, even if "pattern" is not a 
match on $line.

so if i loop through a file running that line, the function Pattern() will execute 
every single time, match or no match.

(my) common sense says this function should only execute when a match is found.  Is 
this a bug? I didn't know about it and something like this could seriously affect 
performance of a program.

Also I don't think the modules or any other of your requirements are relevant for this 


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to