We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f665998 commit 695b669Copy full SHA for 695b669
src/Timer/Timers.php
@@ -38,7 +38,7 @@ public function getTime()
38
39
public function add(TimerInterface $timer)
40
{
41
- $id = \spl_object_hash($timer);
+ $id = \PHP_VERSION_ID < 70200 ? \spl_object_hash($timer) : \spl_object_id($timer);
42
$this->timers[$id] = $timer;
43
$this->schedule[$id] = $timer->getInterval() + $this->updateTime();
44
$this->sorted = false;
@@ -51,7 +51,7 @@ public function contains(TimerInterface $timer)
51
52
public function cancel(TimerInterface $timer)
53
54
55
unset($this->timers[$id], $this->schedule[$id]);
56
}
57
0 commit comments