/PHP-8.4/ext/zip/tests/ |
H A D | bug53854.phpt | 8 var_dump(ZipArchive::CM_DEFAULT); 9 var_dump(ZipArchive::CM_STORE); 10 var_dump(ZipArchive::CM_SHRINK); 11 var_dump(ZipArchive::CM_REDUCE_1); 12 var_dump(ZipArchive::CM_REDUCE_2); 15 var_dump(ZipArchive::CM_IMPLODE); 19 var_dump(ZipArchive::CM_BZIP2); 20 var_dump(ZipArchive::CM_LZMA); 21 var_dump(ZipArchive::CM_TERSE); 22 var_dump(ZipArchive::CM_LZ77); [all …]
|
H A D | oo_archive_flag.phpt | 2 ZipArchive::getArchiveFlag and setArchiveFlag 7 if(version_compare(ZipArchive::LIBZIP_VERSION, '1.10.0', '<')) die('skip libzip < 1.10.0');?> 10 $zip = new ZipArchive(); 14 var_dump($zip->getArchiveFlag(ZipArchive::AFL_RDONLY)); 15 var_dump($zip->setArchiveFlag(ZipArchive::AFL_RDONLY, 1), $zip->status === ZipArchive::ER_OK); 16 var_dump($zip->getArchiveFlag(ZipArchive::AFL_RDONLY)); 20 $zip->open(__DIR__ . "/test.zip", ZipArchive::RDONLY); 21 var_dump($zip->getArchiveFlag(ZipArchive::AFL_RDONLY)); 22 var_dump($zip->setArchiveFlag(ZipArchive::AFL_RDONLY, 0), $zip->status !== ZipArchive::ER_OK); 23 var_dump($zip->getArchiveFlag(ZipArchive::AFL_RDONLY));
|
H A D | oo_supported.phpt | 13 ZipArchive::CM_STORE => "STORE", 14 ZipArchive::CM_DEFLATE => "DEFLATE", 15 ZipArchive::CM_BZIP2 => "BZIP2", 16 ZipArchive::CM_XZ => "XZ", 20 var_dump(ZipArchive::isCompressionMethodSupported($method)); 25 ZipArchive::EM_NONE => "NONE", 26 ZipArchive::EM_TRAD_PKWARE => "TRAD_PKWARE", 27 ZipArchive::EM_AES_128 => "AES-128", 28 ZipArchive::EM_AES_192 => "AES-192", 29 ZipArchive::EM_AES_256 => "AES-256", [all …]
|
H A D | oo_setcompression.phpt | 14 $zip = new ZipArchive; 15 if ($zip->open($tmpfile, ZipArchive::CREATE) !== TRUE) { 27 var_dump($zip->setCompressionName('entry2.txt', ZipArchive::CM_DEFAULT)); 28 var_dump($zip->setCompressionName('dir/entry3.txt', ZipArchive::CM_STORE)); 29 var_dump($zip->setCompressionName('entry4.txt', ZipArchive::CM_DEFLATE)); 31 var_dump($zip->setCompressionIndex(4, ZipArchive::CM_STORE)); 32 var_dump($zip->setCompressionIndex(5, ZipArchive::CM_DEFLATE)); 33 var_dump($zip->setCompressionIndex(6, ZipArchive::CM_DEFAULT)); 64 Deprecated: Function zip_open() is deprecated since 8.0, use ZipArchive::open() instead in %s on li… 66 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … [all …]
|
H A D | zip_entry_compressedsize.phpt | 17 Deprecated: Function zip_open() is deprecated since 8.0, use ZipArchive::open() instead in %s on li… 19 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 21 Deprecated: Function zip_entry_compressedsize() is deprecated since 8.0, use ZipArchive::statIndex(… 24 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 26 Deprecated: Function zip_entry_compressedsize() is deprecated since 8.0, use ZipArchive::statIndex(… 29 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 31 Deprecated: Function zip_entry_compressedsize() is deprecated since 8.0, use ZipArchive::statIndex(… 34 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 36 Deprecated: Function zip_entry_compressedsize() is deprecated since 8.0, use ZipArchive::statIndex(… 39 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … [all …]
|
H A D | zip_entry_compressionmethod.phpt | 17 Deprecated: Function zip_open() is deprecated since 8.0, use ZipArchive::open() instead in %s on li… 19 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 21 Deprecated: Function zip_entry_compressionmethod() is deprecated since 8.0, use ZipArchive::statInd… 24 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 26 Deprecated: Function zip_entry_compressionmethod() is deprecated since 8.0, use ZipArchive::statInd… 29 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 31 Deprecated: Function zip_entry_compressionmethod() is deprecated since 8.0, use ZipArchive::statInd… 34 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 36 Deprecated: Function zip_entry_compressionmethod() is deprecated since 8.0, use ZipArchive::statInd… 39 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … [all …]
|
H A D | zip_entry_filesize.phpt | 17 Deprecated: Function zip_open() is deprecated since 8.0, use ZipArchive::open() instead in %s on li… 19 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 21 Deprecated: Function zip_entry_filesize() is deprecated since 8.0, use ZipArchive::statIndex() inst… 24 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 26 Deprecated: Function zip_entry_filesize() is deprecated since 8.0, use ZipArchive::statIndex() inst… 29 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 31 Deprecated: Function zip_entry_filesize() is deprecated since 8.0, use ZipArchive::statIndex() inst… 34 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 36 Deprecated: Function zip_entry_filesize() is deprecated since 8.0, use ZipArchive::statIndex() inst… 39 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … [all …]
|
H A D | zip_entry_name.phpt | 17 Deprecated: Function zip_open() is deprecated since 8.0, use ZipArchive::open() instead in %s on li… 19 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 21 Deprecated: Function zip_entry_name() is deprecated since 8.0, use ZipArchive::statIndex() instead … 24 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 26 Deprecated: Function zip_entry_name() is deprecated since 8.0, use ZipArchive::statIndex() instead … 29 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 31 Deprecated: Function zip_entry_name() is deprecated since 8.0, use ZipArchive::statIndex() instead … 34 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 36 Deprecated: Function zip_entry_name() is deprecated since 8.0, use ZipArchive::statIndex() instead … 39 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … [all …]
|
H A D | oo_torrentzip.phpt | 7 if (version_compare(ZipArchive::LIBZIP_VERSION, '1.10.0', '<')) die('skip libzip < 1.10.0'); 13 $zip = new ZipArchive(); 17 var_dump($zip->getArchiveFlag(ZipArchive::AFL_IS_TORRENTZIP)); 18 var_dump($zip->setArchiveFlag(ZipArchive::AFL_WANT_TORRENTZIP, 1), $zip->status === ZipArchive::ER_… 23 $zip->open($name, ZipArchive::RDONLY); 24 var_dump($zip->getArchiveFlag(ZipArchive::AFL_IS_TORRENTZIP));
|
H A D | oo_readonly_properties.phpt | 2 Test that ZipArchive properties are read-only 8 $zip = new ZipArchive(); 66 Cannot write read-only property ZipArchive::$lastId 67 Cannot write read-only property ZipArchive::$lastId 69 Cannot write read-only property ZipArchive::$status 71 Cannot write read-only property ZipArchive::$statusSys 73 Cannot write read-only property ZipArchive::$numFiles 75 Cannot write read-only property ZipArchive::$filename 77 Cannot write read-only property ZipArchive::$comment
|
H A D | bug47667.phpt | 2 Bug #47667 (ZipArchive::OVERWRITE seems to have no effect) 10 $zip = new ZipArchive(); 11 if ($zip->open($filename, ZipArchive::CREATE) !== true) { 19 $zip = new ZipArchive(); 20 if ($zip->open($filename, ZipArchive::OVERWRITE) !== true) { 27 $zip = new ZipArchive(); 28 if ($zip->open($filename, ZipArchive::CREATE) !== true) {
|
H A D | compression_methods.phpt | 12 'store' => ZipArchive::CM_STORE, 13 'deflate' => ZipArchive::CM_DEFLATE, 14 'deflate64' => ZipArchive::CM_DEFLATE64, 15 'bzip2' => ZipArchive::CM_BZIP2, 16 'lzma' => ZipArchive::CM_LZMA, 17 'ppmd' => ZipArchive::CM_PPMD 19 $zip = new ZipArchive();
|
H A D | oo_getexternalattributesname_error.phpt | 2 ZipArchive::getExternalAttributesName() throws a ValueError when the $name param is empty 8 $zip = new ZipArchive(); 13 $a = ZipArchive::OPSYS_DEFAULT; 14 $b = ZipArchive::OPSYS_DEFAULT; 23 ZipArchive::getExternalAttributesName(): Argument #1 ($name) must not be empty
|
H A D | oo_add_encoding.phpt | 17 $zip = new ZipArchive; 18 if (!$zip->open($file, ZipArchive::CREATE)) { 23 $zip->addEmptyDir(chr(0x82), ZipArchive::FL_ENC_CP437); 24 $zip->addEmptyDir('è', ZipArchive::FL_ENC_UTF_8); 27 $zip->addFromString(chr(0x91), __FILE__, ZipArchive::FL_ENC_CP437); 28 $zip->addFromString('€', __FILE__, ZipArchive::FL_ENC_UTF_8);
|
H A D | oo_addglob2.phpt | 2 ZipArchive::addGlob() method with more compression and encryption 7 if (!method_exists('ZipArchive', 'setEncryptionName')) die('skip encrytion not supported'); 22 $zip = new ZipArchive(); 23 if (!$zip->open($file, ZipArchive::CREATE | ZipArchive::OVERWRITE)) { 35 'comp_method' => ZipArchive::CM_STORE, 37 'enc_method' => ZipArchive::EM_AES_256, 46 $zip = new ZipArchive();
|
H A D | zip_read.phpt | 18 Deprecated: Function zip_open() is deprecated since 8.0, use ZipArchive::open() instead in %s on li… 20 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 22 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 24 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 26 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 28 Deprecated: Function zip_read() is deprecated since 8.0, use ZipArchive::statIndex() instead in %s … 30 Deprecated: Function zip_close() is deprecated since 8.0, use ZipArchive::close() instead in %s on …
|
H A D | bug76524.phpt | 2 ZipArchive Bug #76524 (memory leak with ZipArchive::OVERWRITE flag and empty archive) 13 $zip = new ZipArchive(); 14 $zip->open($filename, ZipArchive::CREATE | ZipArchive::OVERWRITE);
|
H A D | bug80833.phpt | 2 Bug #80833 (ZipArchive::getStream doesn't use setPassword) 7 if (!method_exists('ZipArchive', 'setEncryptionName')) die('skip encryption not supported'); 11 $create_zip = new ZipArchive(); 12 $create_zip->open(__DIR__ . "/80833.zip", ZipArchive::CREATE); 15 $create_zip->setEncryptionName("test.txt", ZipArchive::EM_AES_256, "first_password"); 17 $create_zip->setEncryptionName("test2.txt", ZipArchive::EM_AES_256, "second_password"); 30 $extract_zip = new ZipArchive(); 31 $extract_zip->open(__DIR__ . "/80833.zip", ZipArchive::RDONLY);
|
H A D | bug_gh8781.phpt | 2 Bug GH-8781 (ZipArchive deletes zip file with no contents) 10 $zip = new ZipArchive(); 11 $zip->open($file, ZipArchive::CREATE | ZipArchive::OVERWRITE);
|
H A D | oo_externalattributes.phpt | 2 ZipArchive::*ExternalAttributes*() function 11 $zip = new ZipArchive; 15 var_dump($zip->setExternalAttributesName('foo.txt', ZipArchive::OPSYS_UNIX, 123)); 17 var_dump($zip->setExternalAttributesIndex($id, ZipArchive::OPSYS_VFAT, 234)); 27 var_dump($zip->setExternalAttributesName('foo.txt', ZipArchive::OPSYS_DOS, 345)); 28 var_dump($zip->setExternalAttributesIndex($id, ZipArchive::OPSYS_AMIGA, 456)); 33 var_dump($zip->getExternalAttributesName('foo.txt', $a, $b, ZipArchive::FL_UNCHANGED), $a, $b); 34 var_dump($zip->getExternalAttributesIndex($id, $a, $b, ZipArchive::FL_UNCHANGED), $a, $b);
|
H A D | bug70103.phpt | 2 Bug #70103 (ZipArchive::addGlob ignores remove_all_path option) 12 $zip = new ZipArchive(); 13 $zip->open($dir . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); 17 $zip = new ZipArchive();
|
H A D | oo_getstreamindex.phpt | 2 ZipArchive::getStreamIndex / ZipArchive::getName 10 $zip = new ZipArchive; 18 $zip->addFromString('bar.txt', 'baz', ZipArchive::FL_OVERWRITE); 37 if (version_compare(ZipArchive::LIBZIP_VERSION, "1.10.0", "<")) { 39 var_dump($zip->status === ZipArchive::ER_CHANGED); 46 $fp = $zip->getStreamIndex(1, ZipArchive::FL_UNCHANGED);
|
/PHP-8.4/ext/zip/examples/ |
H A D | encryption.php | 13 $zip = new ZipArchive; 14 $zip->open($name, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE); 16 $zip->setEncryptionName($file, ZipArchive::EM_AES_256, $pass); 21 $zip = new ZipArchive; 22 $zip->open($name, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE); 25 $zip->setEncryptionName($file, ZipArchive::EM_AES_256);
|
H A D | set_compression.php | 7 $zip = new ZipArchive(); 10 if (!$zip->open($filename, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE)) { 18 $zip->setCompressionName("testfilephp2.txt", ZipArchive::CM_STORE); 19 $zip->setCompressionIndex(2, ZipArchive::CM_STORE);
|
/PHP-8.4/ext/zip/ |
H A D | php_zip_arginfo.h | 317 ZEND_METHOD(ZipArchive, open); 319 ZEND_METHOD(ZipArchive, close); 320 ZEND_METHOD(ZipArchive, count); 322 ZEND_METHOD(ZipArchive, clearError); 325 ZEND_METHOD(ZipArchive, addFile); 327 ZEND_METHOD(ZipArchive, addGlob); 328 ZEND_METHOD(ZipArchive, addPattern); 345 ZEND_METHOD(ZipArchive, statName); 346 ZEND_METHOD(ZipArchive, statIndex); 353 ZEND_METHOD(ZipArchive, extractTo); [all …]
|