getConstants()); */ require __DIR__ . '/../vendor/autoload.php'; (new Amp\UvReactor)->run(function($reactor) { // Let's tick off output once per second so we can see activity. $reactor->repeat(function() { echo "tick: ", date('c'), "\n"; }, $msInterval = 1000); // What to do when a SIGINT signal is received $reactor->onSignal(UV::SIGINT, function() { echo "Caught SIGINT! exiting ...\n"; exit; }); });