summaryrefslogtreecommitdiff
path: root/ext/zip/examples/oldapi.php
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2006-07-24 16:58:58 +0000
committerPierre Joye <pajoye@php.net>2006-07-24 16:58:58 +0000
commit719447d3b6e2ebcb86925c79bb6ba87996be6711 (patch)
tree847a35fc9c48bfa3627d8418a01d74e8aca37c3f /ext/zip/examples/oldapi.php
parentb0e3dfab13d4c805e103300eb1f8428704039255 (diff)
downloadphp-git-719447d3b6e2ebcb86925c79bb6ba87996be6711.tar.gz
- reimport (cannot symlink without replacing 4.4 and 5.0 versions)
Diffstat (limited to 'ext/zip/examples/oldapi.php')
-rw-r--r--ext/zip/examples/oldapi.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/zip/examples/oldapi.php b/ext/zip/examples/oldapi.php
new file mode 100644
index 0000000000..2f17f43ebd
--- /dev/null
+++ b/ext/zip/examples/oldapi.php
@@ -0,0 +1,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);
+}