PharData::decompress

(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL phar >= 2.0.0)

PharData::decompressDecompresses the entire Phar archive

Beschreibung

public PharData::decompress(?string $extension = null): ?PharData

For tar-based archives, this method decompresses the entire archive.

For Zip-based archives, this method fails with an exception. The zlib extension must be enabled to decompress an archive compressed with gzip compression, and the bzip2 extension must be enabled in order to decompress an archive compressed with bzip2 compression.

In addition, this method automatically renames the file extension of the archive, .tar by default. Alternatively, a file extension may be specified with the extension parameter.

Parameter-Liste

extension

For decompressing, the default file extension is .tar. Use this parameter to specify another file extension. Be aware that only executable archives can contain .phar in their filename.

Rückgabewerte

A PharData object is returned on success, or null on failure.

Fehler/Exceptions

Throws BadMethodCallException if the zlib extension is not available, or the bzip2 extension is not enabled.

Changelog

Version Beschreibung
8.0.0 extension is now nullable.

Beispiele

Beispiel #1 A PharData::decompress() example

<?php
$p 
= new PharData('/path/to/my.tar.gz');
$p->decompress(); // creates /path/to/my.tar
?>

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

bsports

Bsport (https://bsports.se.net/) là điểm đến lý tưởng dành cho những ai yêu thích cá cược thể thao và giải trí trực tu ...

Geschrieben von bsportssenets am 30.05.2026 09:49:40
Forum: PHP Developer Forum
MMOexp Maplestory Artale

Mesos are the lifeblood of Maplestory Artale, acting as buy Maplestory Artale Mesos (https://www.mmoexp.com/Artale/Mesos.html) the primary in-game ...

Geschrieben von JeansKeyzhu am 30.05.2026 08:35:09
Forum: PHP Developer Forum
MMOexp CFB 26 one key adjustment that can completely

Running the football in College Football 26 can feel frustrating at times. One game, your running back is buy College Football 26 Coins (https:// ...

Geschrieben von JeansKeyzhu am 30.05.2026 08:32:54
Forum: Fragen/Vorschläge zum Forum
MMOexp Diablo 4 to unleash devastating attacks more

Diablo 4 Season 13 has introduced several powerful builds across every class, but few are as explosive and satisfying as the Bone Spirit Necromanc ...

Geschrieben von JeansKeyzhu am 30.05.2026 08:31:05
Forum: PHP Developer Forum