-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#4223Description
Bug report
it says Right side of && is always true., but it isn't true there.
<?php declare(strict_types = 1);
$matches = false;
if (preg_match('/a/', '', $matches) !== false && $matches) {
var_export($matches);
}Code snippet that reproduces the problem
https://phpstan.org/r/bc430066-e198-435e-bc2d-95dac3ff3d05
Expected output
No phpstan error.
Did PHPStan help you today? Did it make you happy in any way?
always
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels