You are here: Re: echo all the time vs echo at the end - what is faster « PHP Programming Language « IT news, forums, messages
Re: echo all the time vs echo at the end - what is faster

Posted by windandwaves on 10/28/70 11:31

R. Rajesh Jeba Anbiah wrote:
> windandwaves wrote:
>> Hi Folk
>>
>> My question is:
>> echo all the time vs echo at the end - what is faster
> <snip>
>
> As everyone stated, comparing the two, (1) is faster. But, none of
> them are faster as compared to embedded HTML/PHP.
> <quote src="http://in2.php.net/language.basic-syntax#AEN2666">
> for outputting large blocks of text, dropping out of PHP parsing mode
> is generally more efficient than sending all of the text through
> echo() or print().
> </quote>

Agree. While speed is important to me, efficient code is probably even more
important to me.

I now use the "ob_start and flush" method to clean up all my html (it
becomes one line without any tabs, double spaces) for speed, while keeping
the code nicely embedded in php (much easier to put in variables without the
labourious <?php echo $my_variable; ?> every time you want to do so).

Thanks

- Nicolaas

 

Navigation:

[Reply to this 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

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