note 85105 deleted from control-structures.if by googleguy

From: Date: Mon, 25 Mar 2013 01:31:39 +0000
Subject: note 85105 deleted from control-structures.if by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-194191@lists.php.net to get a copy of this message
Note Submitter: jchau at bu dot edu ---- RE: henryk dot kwak at gmail dot com's comment from 04-May-2008 05:01 I think you made a mistake. For maximum efficiency, assuming each expression requires the same amount of processing, the expression that is least likely to be true should come first for expressions connected by && (and). This will reduce the probability that later expressions will need to be evaluated. The opposite is true for || (or). If the most likely expression comes first, then the probability of needing to evaluate later expressions is reduced.

« previous php.notes (#194191) next »