xref: /PHP-5.6/ext/zip/examples/dir.php (revision b734bf4b)
1<?php
2if (!extension_loaded('zip')) {
3    dl('zip.so');
4}
5
6$za = new ZipArchive();
7
8$za->open('test_with_comment.zip');
9print_r($za);
10var_dump($za);
11echo "numFiles: " . $za->numFiles . "\n";
12echo "status: " . $za->status  . "\n";
13echo "statusSys: " . $za->statusSys . "\n";
14echo "filename: " . $za->filename . "\n";
15echo "comment: " . $za->comment . "\n";
16
17for ($i=0; $i<$za->numFiles;$i++) {
18	echo "index: $i\n";
19	print_r($za->statIndex($i));
20}
21echo "numFile:" . $za->numFiles . "\n";
22