CI doc says == FALSE. Why isn't it === false? |
Hello,
At https://codeigniter.com/user_guide/libra...light=form 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, C
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. |
Welcome Guest, Not a member yet? Register Sign In |