Re: R: [PHP] Performance question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2005-12-05 09:05 Sebastian "En3pY" Zdrojewski wrote:
Hi,

I do prefer the first style programming after longer time in programming
PHP. I like the idea of keeping HTML and PHP code separate for cosmetic
purpose as well as mantainance. Actually a code with PHP only, I mean really
with NO HTML code in it, is more portable and easy to mantain. As for
performance I don't know, but a difference is present for sure. Actually I
never benchmarked the performance of the two styles, but wanted to give my
10 cents for the coding style :)

Cheers

En3pY


Yep, I like it too, for the same "cosmetic" reasons.. But now I've become involved in a project where extreme performance is a key issue, so of course I'd like to have some input on the situation...

Anders.





Sebastian Konstanty Zdrojewski
________________________________

URL: http://www.en3py.net/
E-Mail: en3py@xxxxxxxx

________________________________

Le informazioni contenute in questo messaggio sono riservate e
confidenziali. Il loro utilizzo è consentito esclusivamente al destinatario
del messaggio, per le finalità indicate nel messaggio stesso. Qualora Lei
non fosse la persona a cui il presente messaggio è destinato, La invito ad
eliminarlo dal Suo Sistema ed a distruggere le varie copie o stampe, dandone
gentilmente comunicazione. Ogni utilizzo improprio è contrario ai principi
del D.lgs 196/03 e alla legislazione Europea (Direttiva 2002/58/CE).
-----Messaggio originale-----
Da: Anders Norrbring [mailto:lists@xxxxxxxxxxxx] Inviato: lunedì 5 dicembre 2005 8.27
A: PHP General
Oggetto:  Performance question


I've been spending some time to find performance pros and cons, but so far
haven't had any real luck.

Can someone on this list say which is better than the other, and also why,
when it comes to these kinds of syntax:

1.
php code
?>
<html statements><?= $variable ?></end tag> <tag><?= $var2 ?></end tag> <?
more php code

2.
php code
echo "<tag>$variable</end tag>";
echo "<tag>$var2</end tag>";
more php code

In both cases, some processing is done, not that 'echo' uses a lot of cpu
time, but still...
On the other hand, there are more jumps in and out for the interpreter in
the first example...

I'd love some thoughts on this.


--

Anders Norrbring
Norrbring Consulting

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux