PHP 5.1.6 (cli) (built: Jul 16 2008 19:52:52)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
$i = 0;[blog@HomeWorkstation tmp]$ time ./print.php > /dev/null
for($i;$i<10000000;$i++)
{
print "Hello World.\n";
}
real 0m5.894s
user 0m3.095s
sys 0m2.787s
[blog@HomeWorkstation tmp]$ time ./print.php > /dev/null
real 0m5.946s
user 0m2.943s
sys 0m2.996s
[blog@HomeWorkstation tmp]$ time ./print.php > /dev/null
real 0m5.838s
user 0m3.155s
sys 0m2.666s
Echo
$i = 0;
for($i;$i<10000000;$i++)
{
echo "Hello World.\n";
}
[blog@HomeWorkstation tmp]$ time ./echo.php > /dev/null
real 0m6.387s
user 0m3.150s
sys 0m3.208s
[blog@HomeWorkstation tmp]$ time ./echo.php > /dev/null
real 0m6.038s
user 0m3.091s
sys 0m2.928s
[blog@HomeWorkstation tmp]$ time ./echo.php > /dev/null
real 0m6.466s
user 0m3.330s
sys 0m3.110s
There are many pages out there at talk about this topic so do your own search or write your own code and let me know the results you find and I'll post them.
Here's another person's opinion.
http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40