Example: https://psalm.dev/r/bc65d88d33
Psalm incorrectly reports that the last empty() check is never falsy, despite the fact that it may be empty.
Compare that to an example where unset() is not called inside a foreach loop that correctly relaxes the non-empty status of the array: https://psalm.dev/r/93b6a3f313
Example: https://psalm.dev/r/bc65d88d33 Psalm incorrectly reports that the last
empty()
check is never falsy, despite the fact that it may be empty.Compare that to an example where
unset()
is not called inside aforeach
loop that correctly relaxes thenon-empty
status of the array: https://psalm.dev/r/93b6a3f313