|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-13 10:57 UTC] sniper@php.net
[2001-06-18 23:37 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 12:00:01 2025 UTC |
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 issue.