Created
March 5, 2012 22:43
-
-
Save glennpratt/1981690 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function test($x, $y, $z) { | |
var_dump(($x || $y) && ($z || $y)); | |
var_dump(($x && $z) || $y); | |
} | |
test(TRUE, TRUE, TRUE); | |
test(TRUE, FALSE, TRUE); | |
test(TRUE, TRUE, FALSE); | |
test(FALSE, FALSE, TRUE); | |
test(FALSE, TRUE, FALSE); | |
test(TRUE, FALSE, FALSE); | |
test(TRUE, FALSE, TRUE); | |
test(FALSE, TRUE, TRUE); | |
test(FALSE, FALSE, FALSE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment