We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please try Assertion::integerish(fopen(FILE, 'r')); Works but should not.
The text was updated successfully, but these errors were encountered:
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)
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.
Sorry, something went wrong.
Thank you for the report. Fixed in https://github.com/beberlei/assert/releases/tag/v2.7.3
Wow, that was fast ;) Thank you!
No branches or pull requests
Please try Assertion::integerish(fopen(FILE, 'r')); Works but should not.
The text was updated successfully, but these errors were encountered: