(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL phar >= 2.0.0)
PharData 类提供了一个高级接口,用于访问和创建不可执行的 tar 和 zip 归档文件。由于这些归档文件不包含存根并且不能由 phar 扩展执行,因此即使 phar.readonly php.ini 设置为 1,也可以使用 PharData 类创建和操作常规 zip 和 tar 文件。
$filename,$flags = FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS,$alias = null,$format = 0$format = null, ?int $compression = null, ?string $extension = null): ?PharData$format = null, ?int $compression = null, ?string $extension = null): ?Phar$mode = "r", 布尔型 $useIncludePath = false, ?资源 $context = null): SplFileObject