Inspired by a discussing with @Ocramius, @alcaeus, and @Majkl578 today, some comparison operators should not allow an array or string types on its left side, or it will always result in false. Examples:
<?php
var_dump('foo' > 4); //bool(false)
var_dump([1, 2, 3] < 2); //bool(false)
I'd like to discuss it before I propose an implementation for it.
Edit: Now PHPStan does detect comparisons between arrays and numbers: https://phpstan.org/r/eaa2bf97-ddb6-4118-a596-49333c7acf7a, which leave us just with the discussion of strings and numbers.