note 110318 deleted from control-structures.if by googleguy

From: Date: Wed, 10 Oct 2012 20:36:21 +0000
Subject: note 110318 deleted from control-structures.if by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191243@lists.php.net to get a copy of this message
Note Submitter: Anonymouse ---- To johannes I'm confused. You tell me to rewrite if (a) if (b) { X } else { Y } as if (a and b) { X } else { Y } In the first example, Y is executed if (a and !b) is true. In the second example, Y is executed if !(a and b) is true. These are two different conditions; !(a and b) is (!a or !b), not (a and !b). Why are you telling people to change their code so that it breaks?

« previous php.notes (#191243) next »