I needed a script that would time some php I wrote to see if using an output buffer would speed it up. I used the php microtime() function to accomplish the timing feature, and combined that with sessions to capture an average execution time. This is the result:
{$ts}s
";
print "Average execution time: {$ea}s ({$_SESSION['avg_count']} attempts)
";
print "Clear Session
"
?>
As a general rule, using the output buffer can greatly increase the execution speed of php programs.
Comments (1)
Dec 17, 2009 at 05:00 PM
Hawkal:
Exactly what I was looking for, thanks!