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:----t2OR7kyeaNKh8+uWiNI235v6BU/NqtqfQjGqYmdzTheGCoxT3PG7TYLcukJ8Cx/VFQyYfRCwsIJZns3zLWeT3sWDxhbkarih0SSSsQM0rcQYFtvZ/TXrc1Dnii7Wer5W+BNrx6t1GNWLb7KoGPtfPJ4b2juXlI++4os4FEFFrtfWAmFekwBHtQ7VymFuSNGkdUE1OxhOYxUtQjkDkyLQ6EfdeXHVGzwGhIKWGW3RX9LcrIdkvwIVXvC9R5uhcVfXxI/6npQLH2Ch8ZqncijB+f9xTG43YlJ5nzacMcvvMOxyV1fuVUcbExGpAu3P4Yoo824Lo5jAQ09DNVPDh2io5f4UAeAw1N6vRCEC4ExImMeGG866I3HH/e3mst3ty9y2uEEX5bZGbIZOp/RCXSYFfkFNTHYKyI0OxBHCOYkZ+8l3wE04jzpAUD/4CXpShG38JVYj6OJD20iOQUz4WBZCN8SyZwp+msyXglemNk3V9xYgCdtuVznZccjAjjag9NFjkAaVySr3I9B/176Mr84tYguN+vaid33ARIW+gxeJfNAT8h7KRVhQnNLcUZM1+GQ0LJ2J9lyFdP+uO7cLR/KZz7vNKYJNL1mgcFING9QCe2zGuZCMMqmyQ+XkltSlQ9jj6OQ4fm0u3xgW3bdMd5mjPrWsP0ZYcZaiDxwp5Bd/FC8=----ATTACHMENT:----NzQ5OTE2MzM4NDkxNzIzOCA4NjQxMzAyNjIyNzk1OTI0IDg0NDYzNDc2MDA3MzI2NDc=