has anyone ran any test to see what kind of performance hit? I know people
are allways ranting and raving about single or double quotes regarding
performance and people ranting and raving about HTML in or out of echo
statements.
the performance hit just isnt amazing, use what you want I figure, use whats
easier to read. IMHO the last example is the hardest to read.
please please everyone post your own results wether you wan tto back me or
slash me.
<?
for ($c = 0; $c < 10000000; $c++)
{
echo "A";
}
?>
[lee@server lee]$ time php -q test_1.php > /dev/null
23.82user 0.07system 0:25.76elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (448major+2606minor)pagefaults 0swaps
[lee@server lee]$ time php -q test_1.php > /dev/null
23.19user 0.09system 0:24.03elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (447major+2606minor)pagefaults 0swaps
[lee@server lee]$ time php -q test_1.php > /dev/null
23.27user 0.14system 0:26.84elapsed 87%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (447major+2606minor)pagefaults 0swaps
//-----------------
<?
for ($c = 0; $c < 10000000; $c++)
{
echo 'A';
}
?>
[lee@server lee]$ time php -q test_1.php > /dev/null
23.24user 0.01system 0:23.25elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (448major+2606minor)pagefaults 0swaps
[lee@server lee]$ time php -q test_1.php > /dev/null
23.17user 0.10system 0:23.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (447major+2606minor)pagefaults 0swaps
[lee@server lee]$ time php -q test_1.php > /dev/null
23.17user 0.08system 0:23.25elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (447major+2606minor)pagefaults 0swaps
//-------------------
<?
for ($c = 0; $c < 10000000; $c++)
{
?>A<?
}
?>
[lee@server lee]$ time php -q test_1.php > /dev/null
23.26user 0.05system 0:23.58elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (757major+2606minor)pagefaults 0swaps
[lee@server lee]$ time php -q test_1.php > /dev/null
23.21user 0.06system 0:23.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (447major+2606minor)pagefaults 0swaps
[lee@server lee]$ time php -q test_1.php > /dev/null
23.27user 0.02system 0:23.34elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (447major+2606minor)pagefaults 0swaps
Chris Lee
Mediawaveonline.com
"Ignacio Vazquez-Abrams" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 11 Jan 2001, John Guynn wrote:
>
> > Do I pay a performance penality for calling a file that only contains
html
> > code .php or .php3? In otherwords what is the php parser overhead if
there
> > is no php code in the file?
> >
> > John Guynn
> >
> > This email brought to you by RFCs 821 and 1225.
> >
>
> Yes, because that file will be put through the parser regardless of
whether or
> not there's any PHP in it.
>
> --
> Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]