Closed manuxi closed 7 years ago
Well, PHP's type juggling of a resource to non zero...
php -r 'var_dump(fopen("./index.php","r"));'
: resource(5) of type (stream)
php -r 'var_dump((int)fopen("./index.php","r"));'
: int(5)
So, the resource number is integer-ish ...
Interesting issue. I wonder how many people are asserting that resources are integer-ish and are happy with it.
Thank you for the report. Fixed in https://github.com/beberlei/assert/releases/tag/v2.7.3
Wow, that was fast ;) Thank you!
Please try Assertion::integerish(fopen(FILE, 'r')); Works but should not.