private static function fetchRequestUri(array $server): array
    {
        $server += ['IIS_WasUrlRewritten' => null, 'UNENCODED_URL' => '', 'PHP_SELF' => '', 'QUERY_STRING' => null];
        if ('1' === $server['IIS_WasUrlRewritten'] && '' !== $server['UNENCODED_URL']) {
            return explode('?', $server['UNENCODED_URL'], 2) + [1 => null];
        }

        if (isset($server['REQUEST_URI'])) {
            [$path, ] = explode('?', $server['REQUEST_URI'], 2);
            $query = ('' !== $server['QUERY_STRING']) ? $server['QUERY_STRING'] : null;

            return [$path, $query];
        }

        return [$server['PHP_SELF'], $server['QUERY_STRING']];
    }
private static function fetchRequestUri(array $server): array
    {
        $server += ['IIS_WasUrlRewritten' => null, 'UNENCODED_URL' => '', 'PHP_SELF' => '', 'QUERY_STRING' => null];
        if ('1' === $server['IIS_WasUrlRewritten'] && '' !== $server['UNENCODED_URL']) {
            return explode('?', $server['UNENCODED_URL'], 2) + [1 => null];
        }

        if (isset($server['REQUEST_URI'])) {
            [$path, ] = explode('?', $server['REQUEST_URI'], 2);
            $query = ('' !== $server['QUERY_STRING']) ? $server['QUERY_STRING'] : null;

            return [$path, $query];
        }

        return [$server['PHP_SELF'], $server['QUERY_STRING']];
    }
private static function fetchRequestUri ( array $ server ) : array { $ server += [ 'IIS_WasUrlRewritten' => null , 'UNENCODED_URL' => '' , 'PHP_SELF' => '' , 'QUERY_STRING' => null ] ; if ( '1' === $ server [ 'IIS_WasUrlRewritten' ] && '' !== $ server [ 'UNENCODED_URL' ] ) { return explode ( '?' , $ server [ 'UNENCODED_URL' ] , 2 ) + [ 1 => null ] ; } if ( isset ( $ server [ 'REQUEST_URI' ] ) ) { [ $ path , ] = explode ( '?' , $ server [ 'REQUEST_URI' ] , 2 ) ; $ query = ( '' !== $ server [ 'QUERY_STRING' ] ) ? $ server [ 'QUERY_STRING' ] : null ; return [ $ path , $ query ] ; } return [ $ server [ 'PHP_SELF' ] , $ server [ 'QUERY_STRING' ] ] ; }
Returns the environment path.
Returns the environment path .