public static function dispatch(array $dispatchList, Request $request) { $uri = $request->abs_path(); $path = explode(SEPARATOR, $uri); // Fix for PHP it takes the /.. amd adds a space in the first position. We don't need it because all paths will start with / if ($path[0] == '') { array_shift($path); } $extraDepth = $uri[strlen($uri) - 1] == SEPARATOR ? 1 : 0; list($host, $port) = static::splitHostPort($request->host()); return static::tryHostBinding($dispatchList, array_reverse($host), $port, $path, $extraDepth, $request); }