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
When variable is always boolean it is unnecessary to run it trough filter_var with FILTER_VALIDATE_BOOLEAN option.
function test(bool $isTest): bool { - if (filter_var($isTest, FILTER_VALIDATE_BOOLEAN)) { + if ($isTest) { return true; } return false; }
The text was updated successfully, but these errors were encountered:
filter_var is 7x slower than simple boolean check
Sorry, something went wrong.
No branches or pull requests
Feature Request
When variable is always boolean it is unnecessary to run it trough filter_var with FILTER_VALIDATE_BOOLEAN option.
Diff
The text was updated successfully, but these errors were encountered: