summaryrefslogtreecommitdiff
path: root/ext/zip/examples/oldapi.php
blob: 82a6277f3a8d93d2ff938f3c0ebe3594bf37a2b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

$zip = zip_open('examples/test1.zip');
var_dump($zip);

if ($zip) {
	$i = 0;
	while ($zip_entry = zip_read($zip)) {
		var_dump($zip_entry);
		$txt = zip_entry_read($zip_entry, 10);
        echo $i . ": " . $txt . "size: " . zip_entry_filesize($zip_entry) .
			"comp_method: " . zip_entry_compressionmethod($zip_entry) .
			"\n";
		$i++;
	}
	var_dump($zip_entry);
}