public static function parseHomeDir(string $path): string
    {
        if (isset($_SERVER['HOME'])) {
            $path = str_replace('~', $_SERVER['HOME'], $path);
        } elseif (isset($_SERVER['HOMEDRIVE'], $_SERVER['HOMEPATH'])) {
            $path = str_replace('~', $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'], $path);
        }

        return $path;
    }
public static function parseHomeDir(string $path): string
    {
        if (isset($_SERVER['HOME'])) {
            $path = str_replace('~', $_SERVER['HOME'], $path);
        } elseif (isset($_SERVER['HOMEDRIVE'], $_SERVER['HOMEPATH'])) {
            $path = str_replace('~', $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'], $path);
        }

        return $path;
    }
public static function parseHomeDir ( string $ path ) : string { if ( isset ( $ _SERVER [ 'HOME' ] ) ) { $ path = str_replace ( '~' , $ _SERVER [ 'HOME' ] , $ path ) ; } elseif ( isset ( $ _SERVER [ 'HOMEDRIVE' ] , $ _SERVER [ 'HOMEPATH' ] ) ) { $ path = str_replace ( '~' , $ _SERVER [ 'HOMEDRIVE' ] . $ _SERVER [ 'HOMEPATH' ] , $ path ) ; } return $ path ; }
Parse "~" symbol from path.

@param string $path
@return string
Parse ~ symbol from path .