public static function Untar($File) { $Path = File::FileDir($File); $TarGzFile = new PharData($File); $TarGzFile->decompress(); preg_match('/(.*)\\.([^.]*)$/', $File, $matches); $TarPath = str_replace('.' . $matches[2], '', $File); $TarFile = new PharData($TarPath); $TarFile->extractTo($Path); }