|
Posted by David T. Ashley on 11/09/06 15:43
"M" <nospam@here.thankyou> wrote in message
news:qiH4h.49673$r61.46796@text.news.blueyonder.co.uk...
>
> So in that case - PHP engine scans the whole page of text, acting only on
> code it finds between the php start / end tags?
You have to understand that PHP and/or the Zend scripting engine is going to
be designed using formal lexical analysis theory (Lex, Yacc, that kind of
thing), and will be blindingly fast. You'll probably find that you can't
measure a speed difference between echo'd HTML and inline HTML. "echo" is
probably a built-in operator handled mostly by the parser (i.e. not a
function call with a formal interface like most functions). It may be
slightly slower, but any difference may be very hard to measure.
In any case, let us know what you find.
> As a side question / answer - what would peoples preference be in this
> case from a view point of understanding / reading / maintaining code be?
That depends on why "echo" is used.
If it is used for invariant HTML that could just be put inline, then
definitely the inline HTML is easier for people to deal with. IMHO.
[Back to original message]
|