1--TEST-- 2Bug #7214 (zip_entry_read() binary safe) 3--SKIPIF-- 4<?php 5if(!extension_loaded('zip')) die('skip'); 6 ?> 7--FILE-- 8<?php 9$zip = zip_open(__DIR__."/binarynull.zip"); 10if (!is_resource($zip)) die("Failure"); 11$entries = 0; 12$entry = zip_read($zip); 13$contents = zip_entry_read($entry, zip_entry_filesize($entry)); 14if (strlen($contents) == zip_entry_filesize($entry)) { 15 echo "Ok"; 16} else { 17 echo "failed"; 18} 19 20?> 21--EXPECTF-- 22Deprecated: Function zip_open() is deprecated in %s on line %d 23 24Deprecated: Function zip_read() is deprecated in %s on line %d 25 26Deprecated: Function zip_entry_filesize() is deprecated in %s on line %d 27 28Deprecated: Function zip_entry_read() is deprecated in %s on line %d 29 30Deprecated: Function zip_entry_filesize() is deprecated in %s on line %d 31Ok 32