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 function add(TimerInterface $timer)

    {

        $id = \spl_object_hash($timer);

        $this->timers[$id] = $timer;

        $this->schedule[$id] = $timer->getInterval() + $this->updateTime();

        $this->sorted = false;
<?php     public function contains(TimerInterface $timer)

    {

        return isset($this->timers[\spl_object_hash($timer)]);

    }



    public function cancel(TimerInterface $timer)
<?php     public function cancel(TimerInterface $timer)

    {

        $id = \spl_object_hash($timer);

        unset($this->timers[$id], $this->schedule[$id]);

    }