Maybe try:
if(!function_exists('hash_equals')) { function hash_equals($str1, $str2) { if(strlen($str1) != strlen($str2)) { return false; } else { $res = $str1 ^ $str2; $ret = 0; for($i = strlen($res) - 1; $i >= 0; $i--) $ret |= ord($res[$i]); return !$ret; } } } Code from: asphp at dsgml dot com
Copied from the http://php.net/manual/en/function.hash-equals.phpPHP comments.