--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) { dump_entries_name($zip); $zip->close(); } else { echo "failed2\n"; } ?> --CLEAN-- --EXPECTF-- 0 bar 1 foobar/ 2 foobar/baz 3 entry1.txt 4 baz/foo.txt 5 baz/bar.baz