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--EXPECT-- 22Ok 23