public function build(int $shard_id, int $type_id, int $local_id, bool $validate = true): int
    {
        if ($validate) {
            $this->validateShardId($shard_id);
            $this->validateTypeId($type_id);
            $this->validateLocalId($local_id);
        }
        return (0 << (64 - 2))
            | ($shard_id << (64 - 2 - 16))
            | ($type_id << (64 - 2 - 16 - 8))
            | ($local_id << (64 - 2 - 16 - 8 - 38));
    }
public function build(int $shard_id, int $type_id, int $local_id, bool $validate = true): int
    {
        if ($validate) {
            $this->validateShardId($shard_id);
            $this->validateTypeId($type_id);
            $this->validateLocalId($local_id);
        }
        return (0 << (64 - 2))
            | ($shard_id << (64 - 2 - 16))
            | ($type_id << (64 - 2 - 16 - 8))
            | ($local_id << (64 - 2 - 16 - 8 - 38));
    }
public function build ( int $ shard_id , int $ type_id , int $ local_id , bool $ validate = true ) : int { if ( $ validate ) { $ this -> validateShardId ( $ shard_id ) ; $ this -> validateTypeId ( $ type_id ) ; $ this -> validateLocalId ( $ local_id ) ; } return ( 0 << ( 64 - 2 ) ) | ( $ shard_id << ( 64 - 2 - 16 ) ) | ( $ type_id << ( 64 - 2 - 16 - 8 ) ) | ( $ local_id << ( 64 - 2 - 16 - 8 - 38 ) ) ; }
UUID64 builder.

@since 150424 Initial release.

@param int  $shard_id Shard ID (16 bits unsigned max `65535`).
@param int  $type_id  Type ID (8 bits unsigned max `255`).
@param int  $local_id Local ID (38 bits unsigned max `274877906943`).
@param bool $validate Validate each of the IDs first? Defaults to `true`.

@return int UUID64 (64 bits signed max `9223372036854775807`).

- (2 reserve bits; set to a value of 0).
- `shard_id` (16 bits unsigned max `65535`).
- `type_id` (8 bits unsigned max `255`).
- `local_id` (38 bits unsigned max `274877906943`).

= 64 bits signed max: `9223372036854775807` = `PHP_INT_MAX`.
UUID64 builder .