Content-Length: 257220 | pFad | https://github.com/reactphp/event-loop/commit/0221e0d7a1ed08d12e56da25debd98879cd60402

9E id contains · reactphp/event-loop@0221e0d · GitHub
Skip to content

Commit 0221e0d

Browse files
committed
id contains
1 parent a0ec75e commit 0221e0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Timer/Timers.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public function add(TimerInterface $timer)
4646

4747
public function contains(TimerInterface $timer)
4848
{
49-
return isset($this->timers[\spl_object_hash($timer)]);
49+
$id = \PHP_VERSION_ID < 70200 ? \spl_object_hash($timer) : \spl_object_id($timer);
50+
return isset($this->timers[$id]);
5051
}
5152

5253
public function cancel(TimerInterface $timer)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/reactphp/event-loop/commit/0221e0d7a1ed08d12e56da25debd98879cd60402

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy