I will run some benchmarks (even though they may be flaky), but what would
be the fastest execution?
$search = array(
"<!-- [$cmd] -->",
"<!--[$cmd]-->",
"<!-- {".$cmd."} -->",
"<!--{".$cmd."}-->",
"{".$cmd."}",
);
$replace = STARTPHP." $action ".ENDPHP;
$tmpcontent = str_replace($search, $replace, $tmpcontent);
Or, if I created one expression that handled all of the five $search items
(since they are similar) and used preg_replace()?
Thanks!
-Shawn
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php