-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Bug report
Given a variable of type string|false, is_numeric fails to refine out false from the possible types, despite is_numeric(false) === false.
Code snippet that reproduces the problem
How I discovered this (roughly):
https://phpstan.org/r/85224f3b-91f7-4aa8-afa1-316466fb5bf5
Most generically:
https://phpstan.org/r/be0f3875-2615-46fb-bed9-28e400dc2d98
php > var_dump(is_numeric(false));
php shell code:1:
bool(false)
Expected output
No error
Reactions are currently unavailable