CodeIgniter Forums

Full Version: CI doc says == FALSE. Why isn't it === false?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

At you have the comparison:
PHP Code:
if ($this->form_validation->run() == FALSE

Two questions from the above code:

1) The doc says that it returns a boolean result. So, why doesn't it use the "===" operator?
2) PSR-2 says that the constants true, false, and null MUST be in lower case. Would make any difference if I switch FALSE to false in the above example?

Thank you,
1) Because it's practically irrelevant and whoever wrote it wasn't pedantic.
2) PSR-2 is a crappy collection of arbitrary rules, that the FIG is marketing as a standard. It won't make a difference.
Fair enough. Thanks!