Created
February 2, 2017 02:46
-
-
Save RareScrap/71651b863f55006b80f4d27a604047d0 to your computer and use it in GitHub Desktop.
Булевы операции в php имеют приоритеты, отличные от каноничной булевой алгебры
This file contains hidden or 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 | |
$a = true; | |
$b = false; | |
echo ($a || $a & $b); // по порядку - false, иначе true (Выводится true) | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment