note 114966 added to language.operators.logical
| From: | tekreme73 at hotmail dot fr | Date: | Wed, 07 May 2014 03:08:40 +0000 |
| Subject: | note 114966 added to language.operators.logical | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-199474@lists.php.net to get a copy of this message | ||
// Operators &= and |= work as well
// "a &= b" <=> "a = a && b" <=> "a = a AND
b"
// "a |= b" <=> "a = a || b" <=> "a = a OR b"
$res = true;
var_dump($res);
$res &= false;
var_dump($res);
$res |= true;
var_dump($res);
// This code will display :
bool(true)
bool(false)
bool(true)
----
Server IP: 72.52.91.14
Probable Submitter: 69.156.27.108
----
Manual Page -- http://php.net/manual/en/language.operators.logical.php
Edit -- https://master.php.net/note/edit/114966
Del: integrated -- https://master.php.net/note/delete/114966/integrated
Del: useless -- https://master.php.net/note/delete/114966/useless
Del: bad code -- https://master.php.net/note/delete/114966/bad+code
Del: spam -- https://master.php.net/note/delete/114966/spam
Del: non-english -- https://master.php.net/note/delete/114966/non-english
Del: in docs -- https://master.php.net/note/delete/114966/in+docs
Del: other reasons-- https://master.php.net/note/delete/114966
Reject -- https://master.php.net/note/reject/114966
Search -- https://master.php.net/manage/user-notes.php