public static function root($segments = null): string
    {
        $path = __DIR__;
        for ($c1 = 0; $c1 < 4; $c1++) {
            $path = dirname($path);
        }
        $path = str_replace('\\', '/', $path);
        $path = self::addSegmentsToPath($path, $segments);
        return $path;
    }
public static function root($segments = null): string
    {
        $path = __DIR__;
        for ($c1 = 0; $c1 < 4; $c1++) {
            $path = dirname($path);
        }
        $path = str_replace('\\', '/', $path);
        $path = self::addSegmentsToPath($path, $segments);
        return $path;
    }
public static function root ( $ segments = null ) : string { $ path = __DIR__ ; for ( $ c1 = 0 ; $ c1 < 4 ; $ c1 ++ ) { $ path = dirname ( $ path ) ; } $ path = str_replace ( '\\' , '/' , $ path ) ; $ path = self :: addSegmentsToPath ( $ path , $ segments ) ; return $ path ; }
Get path to root of site.

@param string|string[] $segments Dot notation is supported in string. Default null.
@return string
Get path to root of site .