RE: [PHP] Coding Conventions

From: Date: Sat, 04 Nov 2000 11:10:26 +0000
Subject: RE: [PHP] Coding Conventions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23701@lists.php.net to get a copy of this message
> >It is really a matter of balance... Visibly, both are acceptable. > >The > >style that I would choose would depend on the amount of data and > >possessing > >that is going on. > > I think the difference in speed is so minor it's not really worth > considering. It depends on how popular your site is. If it's a really hit, the speed would be noticable. This is due to PHP processing of PHP scripts. Static text (everything outside the <??>) will just pass right through PHP, while for instance an echo(""); need to be parsed by PHP = slower. So if your site is heavy loaded, and you have lot's of static text/HTML in you PHP scripts, you will have advantages of using example 2. But since it's not many who have really heavy loaded sites, wether to use example 1 or 2, should be a question of clarity in the code. Regards, Lars

« previous php.general (#23701) next »