I have the following PHP function
function newUser($username, $password) {
$checkUsernameAvailablity = check($username);
if (!$checkUsernameAvailablity)
{
return -1;
}
$checkPasswordComplexity = checkpass($password);
if (!$checkPasswordComplexity)
{
return -2
}
}
I would like to know if the username will be taken and the password is not complicated enough, whether PHP will stop the function after it returns -1 or continues, and also returns -2.
Thanks in advance RayQuang
source
share