database->conn); $timeMapper = new TimeMapper($app->database->conn); $prev_hash = (int)filter_input(INPUT_GET, 'h'); $times = $timeMapper->getAll(); $hash = crc32(serialize($timeMapper->getAll())); if ($prev_hash !== $hash) { $app->api([ "hash" => $hash, "data" => $times ]); } // return nothing http_response_code(204);