count = (int) shell_exec('nproc') * 4; $http_worker->onWorkerStart = function () { Header::$date = 'Date: '.gmdate('D, d M Y H:i:s').' GMT'; Timer::add(1, function() { Header::$date = 'Date: '.gmdate('D, d M Y H:i:s').' GMT'; }); init(); }; $http_worker->onMessage = static function ($connection) { Http::header(Header::$date); $connection->send(router()); }; Worker::runAll(); class Header { public static $date = null; }