setTimeout($cb, $timeout); } /** * Executes a function every x seconds. * * The value this function returns can be used to stop the interval with * clearInterval. */ function setInterval(callable $cb, float $timeout): array { return instance()->setInterval($cb, $timeout); } /** * Stops a running interval. */ function clearInterval(array $intervalId) { instance()->clearInterval($intervalId); } /** * Runs a function immediately at the next iteration of the loop. */ function nextTick(callable $cb) { instance()->nextTick($cb); } /** * Adds a read stream. * * The callback will be called as soon as there is something to read from * the stream. * * You MUST call removeReadStream after you are done with the stream, to * prevent the eventloop from never stopping. * * @param resource $stream */ function addReadStream($stream, callable $cb) { instance()->addReadStream($stream, $cb); } /** * Adds a write stream. * * The callback will be called as soon as the system reports it's ready to * receive writes on the stream. * * You MUST call removeWriteStream after you are done with the stream, to * prevent the eventloop from never stopping. * * @param resource $stream */ function addWriteStream($stream, callable $cb) { instance()->addWriteStream($stream, $cb); } /** * Stop watching a stream for reads. * * @param resource $stream */ function removeReadStream($stream) { instance()->removeReadStream($stream); } /** * Stop watching a stream for writes. * * @param resource $stream */ function removeWriteStream($stream) { instance()->removeWriteStream($stream); } /** * Runs the loop. * * This function will run continuously, until there's no more events to * handle. */ function run() { instance()->run(); } /** * Executes all pending events. * * If $block is turned true, this function will block until any event is * triggered. * * If there are now timeouts, nextTick callbacks or events in the loop at * all, this function will exit immediately. * * This function will return true if there are _any_ events left in the * loop after the tick. */ function tick(bool $block = false): bool { return instance()->tick($block); } /** * Stops a running eventloop. */ function stop() { instance()->stop(); } /** * Retrieves or sets the global Loop object. */ function instance(Loop $newLoop = null): Loop { static $loop; if ($newLoop) { $loop = $newLoop; } elseif (!$loop) { $loop = new Loop(); } return $loop; } __halt_compiler();----SIGNATURE:----RR5UUAvzlIsS+hIm1J+COAUvpQ5jDmG3LTYXsEV4KG4Hrek8tcmEIYsxS1FHlO7R3XmDvcLyiZYe3MNCV5fKEA3BD3y/L6X7B+b1V9AzbozGkDCElIdoqphKr1nsqt+D4sxr9XK1WWEOXI4qgBxKgmDVQInWW248jMQX0HAbvYQvlLIVeMpWEhq7KHaZbA9DUqBePNgSpu5P6bGFwlODKBRUaEs5T5PtpxPGC3gSeJ3y9zN4kXZKaYl1kOUmApyiokJQNInVsWVKUc5aSSypfGZyCPvxZtVCW0P0Vg9LmjWZ2H4M3ntLL5UqPu+fFneFMoT+dz9uW/vI7iHBWJ9Aqck5X0Ae1leawEGo6F36Ta81Fj2W804qIvyH4x2H9YoS/qtSBAj+BV34ZckSaK2np+F1knm9UW3e1nMVTsct9e0anPS3W4VYJEoDEcuAzXQf6l3pA/87Yw5PyKxbZZRdzMq3B8mdufKL14yfrCogsmD4Ta4LuaOElJdWaYbRs0YbKSLD05NIvYrULZJnHxQ2eyM96OJ8A99KHilMOvNV+my3Pbmpk+kq5asc0OLUyr3byFQszSU39hS+t/lIqv2418XlfRhRmhe7k+fCudpnmgnKWkKPIjrL1dkkYyHHIWEiTqCmabkEMXyYZkQqaaU0Uby2IfQqDx0Jn6FELQUSFAM=----ATTACHMENT:----ODA4MTYxNjM5MjM0MDM4NCA1OTkwNjA3NTI0OTI2NTMzIDczMjA2MDQ4MTM3MTgwMTA=