Re: PHP and HTML

From: Date: Mon, 28 Feb 2000 17:59:25 +0000
Subject: Re: PHP and HTML
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3600@lists.php.net to get a copy of this message
I agree. I think that performance issues are very insignifigant. If you are grasping for every little microsecond, <taco bell dog> I theenk i need a beeger box (maybe 2 :) </taco bell dog> I quite often do print tags, in areas im pussling a lot of variables, say a mysql while loop, i dont wanna break in and out of php, over and over, so i do a print like this: print " htmlcode $variable $variable2 $variable3 htmlcodehtmlcodehtmlcodehtmlcodehtmlcodehtmlcode $variable5 $variable6 htmlcodehtmlcodehtmlcode "; (One print statement for multiple lines.) Also, keep in mind you CAN use ' in your html as opposed to " so you dont have to escape it all :) (i.e. print "<font face='$font1' size='2' color='#FFFFFF'>"; as opposed to: (i.e. print "<font face=\"$font1\" size=\"2\" color=\"#FFFFFF\">"; - dave ----- Original Message ----- From: "Jason" <jasonc@webpipe.net> To: <php-general@lists.php.net> Sent: Wednesday, June 28, 2000 8:33 AM Subject: RE: [PHP] PHP and HTML > Even though it might be a bit faster to break in and out of PHP to output > straight HTML, I look at two things. Is it faster to write and read? The > speed advantages won't be huge so unless you're grasping for every last > microsecond, I wouldn't worry about it. Generally if I need to output a > huge block of HTML in a loop for instance, I'll break out of php to type the > html and then break back in. Alot faster than typing a million echo > statements. If I wanted that, I'd write servelts and their blasted println > statements.... > > Jason > > > -----Original Message----- > > From: Billy Harvey [mailto:Billy.Harvey@RhinoComputing.com] > > Sent: Wednesday, June 28, 2000 10:18 AM > > To: php-general@lists.php.net > > Subject: RE: [PHP] PHP and HTML > > > > > > > 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 > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > _______________________________________________________ > Site Design, Hosting, and E-Commerce at www.webpipe.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#3600) next »