note 75753 added to language.operators.logical
| From: | eduardofleury at uol dot com dot br | Date: | Thu, 14 Jun 2007 13:16:52 +0000 |
| Subject: | note 75753 added to language.operators.logical | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127474@lists.php.net to get a copy of this message | ||
;;;;;;;;;;;;;;;;;;;;;;;;;
; P1 P2; And; OR ; XOR ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; V V ; V ; V ; F ;
; V F ; F ; V ; V ;
; F V ; F ; V ; V ;
; F F ; F ; F ; F ;
;;;;;;;;;;;;;;;;;;;;;;;;;
<?php
$a = 2;
$b = 3;
$c = 6;
print !($a > $b && $b < $c);// true
print (($a > $b) and ($b < $c));// false
print ($a == $b or $b < $c); // true
print $a == $b || $b < $c; // true
$x = $a < $b; //$x = true
$y = $b === $c; //$y = false
print $x xor $y; // true
?>
----
Server IP: 69.147.83.197
Probable Submitter: 189.11.192.59
----
Manual Page -- http://www.php.net/manual/en/language.operators.logical.php
Edit -- https://master.php.net/note/edit/75753
Del: integrated -- https://master.php.net/note/delete/75753/integrated
Del: useless -- https://master.php.net/note/delete/75753/useless
Del: bad code -- https://master.php.net/note/delete/75753/bad+code
Del: spam -- https://master.php.net/note/delete/75753/spam
Del: non-english -- https://master.php.net/note/delete/75753/non-english
Del: in docs -- https://master.php.net/note/delete/75753/in+docs
Del: other reasons-- https://master.php.net/note/delete/75753
Reject -- https://master.php.net/note/reject/75753
Search -- https://master.php.net/manage/user-notes.php