-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
Hi, I have found a small issue after upgrading to newest phpstan 2.1.39 (from 2.1.36), and got reported
Parameter #1 $value of function intval expects array|bool|float|int|resource|string|null, SimpleXMLElement given.
Even when official doc says
intval() should not be used on objects, as doing so will emit an E_WARNING level error and return 1.
it works without a warning and looks like a special case.
(https://3v4l.org/cOvks#v8.5.3)
Code snippet that reproduces the problem
https://phpstan.org/r/974d2e74-2e37-461b-814f-1a3d8d84b4a9
Expected output
No error reported
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels