note 75652 deleted from language.operators.logical by tularis
| From: | tularis@php.net | Date: | Sun, 10 Jun 2007 21:53:05 +0000 |
| Subject: | note 75652 deleted from language.operators.logical by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127367@lists.php.net to get a copy of this message | ||
Note Submitter: Eduardo Fleury
----
;;;;;;;;;;;;;;;;;;;;;;;;;
; 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
?>