spl_object_hash

Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8
Return hash id for given object
<?php spl_object_hash(object $object): string
<?php     public static function typeNotRegistered(Type $type): self

    {

        return new self(

            sprintf('Type of the class %s@%s is not registered.', get_class($type), spl_object_hash($type))

        );

    }
<?php     public static function typeAlreadyRegistered(Type $type): self

    {

        return new self(

            sprintf('Type of the class %s@%s is already registered.', get_class($type), spl_object_hash($type))

        );

    }

}