(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL phar >= 1.0.0)
The Phar class provides a high-level interface to accessing and creating phar archives.
$filename, int $flags = FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS, ?string $alias = null)$format = null, ?int $compression = null, ?string $extension = null): ?PharData$format = null, ?int $compression = null, ?string $extension = null): ?Phar$alias = null,$index = null,$fileNotFoundScript = null,$mimeTypes = [],$rewrite = null| Версія | Опис |
|---|---|
| 8.4.0 | Added support for the Unix timestamp extension for Zip-based archives. |
| 8.0.0 | Meta-data is no longer deserialized upon opening the archive, but is deferred until Phar::getMetadata() is called. |
Prior to PHP 8.0.0, the meta-data was deserialized upon opening the archive. This could lead to security vulnerabilities. Starting with PHP 8.0.0, meta-data is only deserialized when calling Phar::getMetadata(), which has options to restrict deserialization for security reasons.