/** * @task hook */ public static function didStartup() { self::$startTime = microtime(true); self::$globals = array(); static $registered; if (!$registered) { // NOTE: This protects us against multiple calls to didStartup() in the // same request, but also against repeated requests to the same // interpreter state, which we may implement in the future. register_shutdown_function(array(__CLASS__, 'didShutdown')); $registered = true; } self::setupPHP(); self::verifyPHP(); if (isset($_SERVER['REMOTE_ADDR'])) { self::rateLimitRequest($_SERVER['REMOTE_ADDR']); } self::normalizeInput(); self::verifyRewriteRules(); self::detectPostMaxSizeTriggered(); self::beginOutputCapture(); self::$rawInput = (string) file_get_contents('php://input'); }