note 110318 added to control-structures.if
| From: | Anonymouse | Date: | Wed, 10 Oct 2012 11:42:26 +0000 |
| Subject: | note 110318 added to control-structures.if | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191232@lists.php.net to get a copy of this message | ||
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?
----
Server IP: 69.147.83.199
Probable Submitter: 27.99.20.143
----
Manual Page -- http://www.php.net/manual/en/control-structures.if.php
Edit -- https://master.php.net/note/edit/110318
Del: integrated -- https://master.php.net/note/delete/110318/integrated
Del: useless -- https://master.php.net/note/delete/110318/useless
Del: bad code -- https://master.php.net/note/delete/110318/bad+code
Del: spam -- https://master.php.net/note/delete/110318/spam
Del: non-english -- https://master.php.net/note/delete/110318/non-english
Del: in docs -- https://master.php.net/note/delete/110318/in+docs
Del: other reasons-- https://master.php.net/note/delete/110318
Reject -- https://master.php.net/note/reject/110318
Search -- https://master.php.net/manage/user-notes.php