html - Integer is returned instead of boolean in php -


i hope doing great. have class in project various methods. thing happens is, 1 of methods supposed return boolean variable. instead. returned number "1" instead of false. if tell me problem.
thanks in advance, cheers. useful pieces of code:
class method:

public function validatepwd($pwd1, $pwd2) {     if (strcasecmp($pwd1, $pwd2) == 0)      {         return true;     }     else      {         return false;     } } 

the script executes it:

$check1 = $user->validatepwd($password, $password1);     echo $check1;     if ($user->validatepwd($password, $password1))      {      }     else     {        $errors[] = 'error!, passwords entered not compatible, please'                . ' enter passwords match each other';      } 

if var_dump($check1) instead of echo $check1; should show boolean.


Comments