note 75652 added to language.operators.logical
| From: | EduardoFleury at osu1 dot php dot net | Date: | Sun, 10 Jun 2007 19:40:01 +0000 |
| Subject: | note 75652 added to language.operators.logical | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127364@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: 201.31.232.240
----
Manual Page -- http://www.php.net/manual/en/language.operators.logical.php
Edit -- https://master.php.net/note/edit/75652
Del: integrated -- https://master.php.net/note/delete/75652/integrated
Del: useless -- https://master.php.net/note/delete/75652/useless
Del: bad code -- https://master.php.net/note/delete/75652/bad+code
Del: spam -- https://master.php.net/note/delete/75652/spam
Del: non-english -- https://master.php.net/note/delete/75652/non-english
Del: in docs -- https://master.php.net/note/delete/75652/in+docs
Del: other reasons-- https://master.php.net/note/delete/75652
Reject -- https://master.php.net/note/reject/75652
Search -- https://master.php.net/manage/user-notes.php