You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I had an issue with an expression $r = $a xor $b; which looks pretty obvious what is intended, despite it does not work as that. The precedence of = over xor makes a dead code from xor $b. (Same applies also for or / and, however they are less common used.) https://phpstan.org/r/29428d5b-5f46-4827-8b64-e54000821c9d
I believe it could be detected by Phpstan.
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered:
Feature request
Phpstan detects only simple expressions (
$a;
) which does not do anything, but not more complex ones ($a || $b
): https://phpstan.org/r/27c2d921-4ecd-4d4d-a11f-984b4f05a81aHowever, I had an issue with an expression
$r = $a xor $b;
which looks pretty obvious what is intended, despite it does not work as that. The precedence of=
overxor
makes a dead code fromxor $b
. (Same applies also foror
/and
, however they are less common used.)https://phpstan.org/r/29428d5b-5f46-4827-8b64-e54000821c9d
I believe it could be detected by Phpstan.
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: