--TEST-- ZipArchive::addGlob() method --CREDITS-- Sammy Kaye Powers w/Kenzo over the shoulder #phptek Chicago 2014 --SKIPIF-- --FILE-- open($file)) { exit('failed'); } $options = array('add_path' => 'baz/', 'remove_all_path' => TRUE); if (!$zip->addGlob($dirname . '*.{txt,baz}', GLOB_BRACE, $options)) { echo "failed1\n"; } if ($zip->status == ZIPARCHIVE::ER_OK) { if (!verify_entries($zip, [ "bar", "foobar/", "foobar/baz", "entry1.txt", "baz/foo.txt", "baz/bar.baz" ])) { echo "failed\n"; } else { echo "OK"; } $zip->close(); } else { echo "failed3\n"; } ?> --CLEAN-- --EXPECT-- OK