Here's how the script looked to begin with, execution time not noticeable:
<?php
$html = "";
$html .= "some text 1";
$html .= "some text 2";
...
$html .= "some text n";
echo $html;
?>
later I wanted to clean it up, so I wrote it as follows, execution time now up to several seconds!!
<?php
function addToHtml(&$dest, $text)
{
$dest .= $text;
}
$html = "";
addToHtml($html, "some text 1");
addToHtml($html, "some text 2");
...
addToHtml($html, "some text n");
echo $html;
?>
why would this code-change make the script take soooooo much more time to execute?
I'm using Apache 2 with PHP4.3.
Thanks for your help,
Ben