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

Posted by M on 11/09/06 13:47

Hi,
Suppose you have the situation where you have say 20 blocks of text (~250
chars each) in a MySQL db that you need to display, but each has a condition
to check to see whether you should display it or not.

As far as I can see, you have 2 options:

1. A continuous block of php, with all the text displayed via echo commands

2. Or jumping in and out of php for each block of text i.e.
<?php ...if condition ?>
pure html
<?php ...if end ?>

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?

My general point is, is it "better" to echo html out (css, formatting and
all) or continuously jump in/out of php (and only echo MySQL data) if you
have a lot of php logic / control in your page?

Thanks,
M

 

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

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