RE: [PHP] Re: Hmmm?

From: Date: Fri, 03 Aug 2001 07:16:41 +0000
Subject: RE: [PHP] Re: Hmmm?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61092@lists.php.net to get a copy of this message
>From: Richard Lynch [mailto:ceo@l-i-e.com] >> Why you ppl. do this: >> if ($condition) { >> file://action 1 >> file://action 2 >> file://action 3 >> >> } > >Because they have been saved. have to agree with you there >> instead of this: >> if ($condition) >> { >> file://action 1 >> file://action 2 >> file://action 3 >> } > >Because they are damned to hell. and there :) >Bottom line: You'll never, ever, ever get a majority vote on this one. Use >the one you like, and deal with it when somebody else uses the other one. additionally I also tend to always provide an alternative, especially if dealing with nested ifs or loops, even if just a comment... call it habit (from where I don't know). if($condition){ do this }else{ # oops, $condition didn't exist } saves a hell of alot of time when going back through the code 6 months later trying to remember what was being done where. personal opinion mind you Dave

« previous php.general (#61092) next »