(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL phar >= 2.0.0)
The PharData class provides a high-level interface to accessing and creating
non-executable tar and zip archives. Because these archives do not contain
a stub and cannot be executed by the phar extension, it is possible to create
and manipulate regular zip and tar files using the PharData class even if
phar.readonly
php.ini setting is 1
.
$filename
, int $flags
= FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS
, string|null $alias
= null
, int $format
= 0
)$iterator
, string|null $baseDirectory
= null
) : array|false$format
= null
, int|null $compression
= null
, string|null $extension
= null
) : Phar|null$format
= null
, int|null $compression
= null
, string|null $extension
= null
) : Phar|null$directory
, array|string|null $files
= null
, bool $overwrite
= false
) : bool