You are here: Re: Performance of lots of ECHO's V Jumping In/Out of PHP « PHP Programming Language « IT news, forums, messages
Re: Performance of lots of ECHO's V Jumping In/Out of PHP

Posted by Michael Fesser on 11/09/06 16:16

..oO(M)

>So in that case - PHP engine scans the whole page of text, acting only on
>code it finds between the php start / end tags?

Yep.

>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?

Do you really care about some CPU cycles? It's like optimizing string
output with single quotes instead of double quotes, but still using a
bubble sort algo. If you get performance problems, you should run a
profiler to see where your script wastes time. I'm sure it won't be the
'echo' part. The bottlenecks are usually somewhere else.

I prefer your first version, simply because the code is more readable
and easier to maintain.

Micha

 

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

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