xref: /PHP-8.3/ext/zip/examples/oldapi.php (revision 58b17906)
1<?php
2
3$zip = zip_open('examples/test1.zip');
4var_dump($zip);
5
6if ($zip) {
7    $i = 0;
8    while ($zip_entry = zip_read($zip)) {
9        var_dump($zip_entry);
10        $txt = zip_entry_read($zip_entry, 10);
11        echo $i . ": " . $txt . "size: " . zip_entry_filesize($zip_entry) .
12            "comp_method: " . zip_entry_compressionmethod($zip_entry) .
13            "\n";
14        $i++;
15    }
16    var_dump($zip_entry);
17}
18