Reply to Re: Performance of lots of ECHO's V Jumping In/Out of PHP

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация