phpstan-src
phpstan-src copied to clipboard
added filter_var() type inference
based on FILTER_VALIDATE_* constants
inspired by https://github.com/php/php-src/issues/9311
added handling for special cases I just realized by reading the comments from https://www.php.net/manual/de/filter.filters.validate.php
another interessting case is, that FILTER_VALIDATE_BOOL is not defined below php 8
https://3v4l.org/eT8oD