Bug report
PHPStan inferres DateInterval::format('%a') to be lowercase-string&non-falsy-string. In case of a difference of the same date the return value can be '0' which is a falsy string.
Code snippet that reproduces the problem
https://phpstan.org/r/1bb0f53b-a6fe-4b17-b6a3-53f0e43be198
Expected output
Based on https://www.php.net/manual/en/dateinterval.format.php
The output might be a numeric string or (unknown).
The expected output: Dumped type: numeric-string|"(unknown)"
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
PHPStan inferres DateInterval::format('%a') to be lowercase-string&non-falsy-string. In case of a difference of the same date the return value can be
'0'which is a falsy string.Code snippet that reproduces the problem
https://phpstan.org/r/1bb0f53b-a6fe-4b17-b6a3-53f0e43be198
Expected output
Based on https://www.php.net/manual/en/dateinterval.format.php
The output might be a numeric string or
(unknown).The expected output:
Dumped type: numeric-string|"(unknown)"Did PHPStan help you today? Did it make you happy in any way?
No response