16 lines
298 B
PHP
16 lines
298 B
PHP
<?php
|
|
|
|
require_once __DIR__."/../vendor/autoload.php";
|
|
|
|
use NoccyLabs\Ipc\Interop\Async\Timer;
|
|
|
|
$timer1 = new Timer(function () { echo "Hello "; });
|
|
$timer2 = new Timer(function () { echo "World! "; });
|
|
|
|
for ($n = 0; $n < 1000; $n++) {
|
|
if ($n == 500) {
|
|
unset($timer2);
|
|
}
|
|
usleep(10000);
|
|
}
|