note 98979 added to language.operators.bitwise
| From: | steffen at NO-SPAM dot haugk dot co dot uk | Date: | Tue, 20 Jul 2010 10:23:27 +0000 |
| Subject: | note 98979 added to language.operators.bitwise | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170983@lists.php.net to get a copy of this message | ||
It says above that the effect of
E_ALL & ~E_NOTICE
can also be achieved by
E_ALL ^ E_NOTICE
NB: XOR is not equivalent to AND NOT.
This only works here because E_ALL consists of 1s mostly, with the exception of the bit for
E_STRICT.
As E_ALL means all error levels apart from E_STRICT. XORing any error level switches it off, but
XORing E_STRICT will switch it on.
E_ALL ^ E_NOTICE : E_NOTICE switched off
E_ALL ^ E_STRICT : E_STRICT switched on
E_ALL & ~E_NOTICE : E_STRICT switched off
E_ALL & ~E_STRICT : E_STRICT remains switched off
----
Server IP: 69.147.83.197
Probable Submitter: 93.97.175.65
----
Manual Page -- http://www.php.net/manual/en/language.operators.bitwise.php
Edit -- https://master.php.net/note/edit/98979
Del: integrated -- https://master.php.net/note/delete/98979/integrated
Del: useless -- https://master.php.net/note/delete/98979/useless
Del: bad code -- https://master.php.net/note/delete/98979/bad+code
Del: spam -- https://master.php.net/note/delete/98979/spam
Del: non-english -- https://master.php.net/note/delete/98979/non-english
Del: in docs -- https://master.php.net/note/delete/98979/in+docs
Del: other reasons-- https://master.php.net/note/delete/98979
Reject -- https://master.php.net/note/reject/98979
Search -- https://master.php.net/manage/user-notes.php