--TEST-- close() called twice --SKIPIF-- --FILE-- open(dirname(__FILE__) . '/test.zip')) { die('Failure'); } if ($zip->status == ZIPARCHIVE::ER_OK) { var_dump($zip->close()); var_dump($zip->close()); } else { die("Failure"); } ?> Done --EXPECTF-- Procedural NULL Warning: zip_close(): %i is not a valid Zip Directory resource in %s bool(false) Object bool(true) Warning: ZipArchive::close(): Invalid or uninitialized Zip object in %s bool(false) Done