RE: [PHP] PHP and HTML

From: Date: Wed, 28 Jun 2000 16:17:49 +0000
Subject: RE: [PHP] PHP and HTML
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-3594@lists.php.net to get a copy of this message
> What is the break even point between more opening/closing PHP tags, and the > overhead supplied by using echo statements and less opening/closing PHP > tags. At what point is one more beneficial than the other? > > Has anyone ever done any solid analysis on this? I would be interested in > the results. > > Sam Masiello > System Analyst > Chek.Com > (716) 853-1362 x289 > smasiello@chekinc.com Sam, I think it would difficult to assess a meaningful number. Even looking at just the Unix world alone at first, you'd have to compare several possibilities, such as php as a cgi, or php as an Apache module (and Apache is not the only server of course). The variant of Apache you used might have a significant effect because of its interfacing. The version of php you used might be significant. The load on the system would definitely matter. Even isolating the system for just such a test would give rather meaningless results I believe, as few systems are going to be serving the same page continuously, and as php is best used in an environment where the customer is making a dynamic selection, often with multiple lookups on databases. I guess the whole point of the above is that unless echo is *terribly* inefficient (and outputting a string is about the simplest thing an interpreter can do), then the ease of use factor would be more important. Most people here seem to like jumping in and out of php all the time. I'm not in that camp, and prefer to enter php at the beginning and leave it at the end. That way I know everything in between is php either calculating, fetching, or outputting. It helps me keep things straight. Heck, I even hate having to output Javascript - I want a browser module that can read php at the receiving end - but that's another subject. Billy

« previous php.general (#3594) next »