classes/Password.php
public static function verify($password, $hash){
        // Pre PHP 5.5 support
        if (!defined('PASSWORD_DEFAULT') || substr($hash,0,4)=='$5h$') {
            return '$5h$'.hash('sha1',$password) == $hash;
        } else {
            return password_verify($password,$hash);
        }
    }
public static function verify($password, $hash){
        // Pre PHP 5.5 support
        if (!defined('PASSWORD_DEFAULT') || substr($hash,0,4)=='$5h$') {
            return '$5h$'.hash('sha1',$password) == $hash;
        } else {
            return password_verify($password,$hash);
        }
    }
public static function verify ( $ password , $ hash ) { // Pre PHP 5.5 support if ( ! defined ( 'PASSWORD_DEFAULT' ) || substr ( $ hash , 0 , 4 ) == '$5h$' ) { return '$5h$' . hash ( 'sha1' , $ password ) == $ hash ; } else { return password_verify ( $ password , $ hash ) ; } }
Verify if password match a given hash
@param  string $password The password to check
@param  string $hash     The hash to match against
@return bool             Returns `true` if hash match password
Verify if password match a given hash