Posted by M on 11/09/06 14:54
"ZeldorBlat" <zeldorblat@gmail.com> wrote in message
news:1163082078.036743.251700@e3g2000cwe.googlegroups.com...
>
> David T. Ashley wrote:
>> "M" <nospam@here.thankyou> wrote in message
>> news:NjG4h.49647$r61.43856@text.news.blueyonder.co.uk...
>> >
>> > Which would be more performant? I understand that echo's are poor in
>> > performance with large blocks of text, but what is the overhead of the
>> > web
>> > server (Apache) making repeated calls to the php engine?
>>
>
> It's also worth noting that Apache only makes one call to the PHP
> engine. In other words, the entire script is parsed and executed by
> PHP -- there is no "jumping in and out" just because the ?> tag is
> encountered.
>
So in that case - PHP engine scans the whole page of text, acting only on
code it finds between the php start / end tags?
I guess then I am wondering whether it is more efficient for the PHP engine
to start / stop it's processing of php code multiple times or whether it is
more efficient to output ECHO statements between the if conditions? Think
that I'll put a test page together to test this.
As a side question / answer - what would peoples preference be in this case
from a view point of understanding / reading / maintaining code be?
M.
Navigation:
[Reply to this message]
|