public static function verify($password, $hash)
    {
        if ($password === $hash) {
            return true;
        }
        if (APR1::verify($password, $hash)) {
            return true;
        }
        if ($hash === self::sha1($password)) {
            return true;
        }
        if (self::cryptVerify($password, $hash)) {
            return true;
        }
        if (substr($hash, 0, 2) === '$2') {
            if (BCrypt::verify($password, $hash)) {
                return true;
            }
        }
        return false;
    }
public static function verify($password, $hash)
    {
        if ($password === $hash) {
            return true;
        }
        if (APR1::verify($password, $hash)) {
            return true;
        }
        if ($hash === self::sha1($password)) {
            return true;
        }
        if (self::cryptVerify($password, $hash)) {
            return true;
        }
        if (substr($hash, 0, 2) === '$2') {
            if (BCrypt::verify($password, $hash)) {
                return true;
            }
        }
        return false;
    }
public static function verify ( $ password , $ hash ) { if ( $ password === $ hash ) { return true ; } if ( APR1 :: verify ( $ password , $ hash ) ) { return true ; } if ( $ hash === self :: sha1 ( $ password ) ) { return true ; } if ( self :: cryptVerify ( $ password , $ hash ) ) { return true ; } if ( substr ( $ hash , 0 , 2 ) === '$2' ) { if ( BCrypt :: verify ( $ password , $ hash ) ) { return true ; } } return false ; }
Checks if a password matches a hash

@param string $password
@param string $hash
@return bool
Checks if a password matches a hash