Clarify on PHP operators precedence ! and =
I was happy coding until I wrote a code like this (in PHP 8.2): if (!$a = false) { echo ‘$a is false’; } This snippet will print $a is false as expected. But according to the PHP documentation, the ! operator has greater precedence over the = operator, so that should be interpreted as… Read More Clarify on PHP operators precedence ! and =