src/includes/classes/Core/Utils/Uuid64.php
public function typeIdIn(int $uuid, int $expecting_type_id = null, bool $validate = true): int
    {
        $type_id = ($uuid >> (64 - 2 - 16 - 8)) & 255;

        if (isset($expecting_type_id)) {
            $this->validateTypeId($type_id, $expecting_type_id);
        } elseif ($validate) {
            $this->validateTypeId($type_id);
        }
        return $type_id;
    }
public function typeIdIn(int $uuid, int $expecting_type_id = null, bool $validate = true): int
    {
        $type_id = ($uuid >> (64 - 2 - 16 - 8)) & 255;

        if (isset($expecting_type_id)) {
            $this->validateTypeId($type_id, $expecting_type_id);
        } elseif ($validate) {
            $this->validateTypeId($type_id);
        }
        return $type_id;
    }
Type ID from UUID64.

@since 150424 Initial release.

@param int      $uuid              Input UUID64 (64 bits signed max `9223372036854775807`).
@param int|null $expecting_type_id Expected type ID; i.e., validate for this type ID?
@param bool     $validate          Validate the type ID after extraction? Defaults to `true`.

@return int Type ID from UUID64 (8 bits unsigned max `255`).