I saw this line of code and I was asking myself the reason of this syntaxe
if(false && isset($_SESSION['new_user']) && $_SESSION['new_user'] == true)
Basically the context is if we have a new user we treat him differently than existing users.
My first guess is that is made to avoid search values in a null variable. So first he tests if there is a variable, and if there is he checks its value. Is that what he does?
But everything inside the same if statement.
My question is, if the first part of the if statement is false, the second part is not tested? Is this a good practice? or would be better to do like this:
if(($_SESSION['new_user']){
if ($_SESSION['new_user'] == true){
[...]
}
}