src/Hash.php
static public function examine($hash)
    {
        if (strlen($hash) == 40 && preg_match("/^[0-9]{4}/", $hash)) {

            $e_uid_pos = substr($hash, 0, 2);
            $e_uid_length = substr($hash, 2, 2);
            $e_uid = substr($hash, $e_uid_pos, $e_uid_length);

            $uid = self::decode($e_uid);

            preg_match('/^([0-9]{4})(.{2,' . ($e_uid_pos - 4) . '})(' . $e_uid . ')/', $hash, $excerpt);
            $partial = $excerpt[2];

            return array($uid, $partial);
        }
        else
        {
            /*
             * The hash is not valid
             */
            return array(false, false);
        }
    }
static public function examine($hash)
    {
        if (strlen($hash) == 40 && preg_match("/^[0-9]{4}/", $hash)) {

            $e_uid_pos = substr($hash, 0, 2);
            $e_uid_length = substr($hash, 2, 2);
            $e_uid = substr($hash, $e_uid_pos, $e_uid_length);

            $uid = self::decode($e_uid);

            preg_match('/^([0-9]{4})(.{2,' . ($e_uid_pos - 4) . '})(' . $e_uid . ')/', $hash, $excerpt);
            $partial = $excerpt[2];

            return array($uid, $partial);
        }
        else
        {
            /*
             * The hash is not valid
             */
            return array(false, false);
        }
    }
Checks and validates a confirmation hash

@param string $hash hashed string to check

@return array