Re: PHP code optimization

From: Date: Tue, 09 Jul 2002 21:58:24 +0000
Subject: Re: PHP code optimization
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-106591@lists.php.net to get a copy of this message
On Tue, Jul 09, 2002 at 12:32:59PM -0700, Peter Thoenen wrote: > Which is quicker (this is on a webpage also..NOT > commandline)? > > <?php if ($a){ echo 'abc'; } ?> > OR > <?php if ($a) { ?> abc <?php } ?> The difference is very marginal. Write whichever makes more sense in the context. Short tidbits just don't matter. Larger stretches of text are easier to just send out as is rather than echo. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

« previous php.general (#106591) next »