1--TEST-- 2Test function stream_get_meta_data on a zlib stream 3--EXTENSIONS-- 4zlib 5--FILE-- 6<?php 7echo "no wrapper\n"; 8$f = __DIR__."/004.txt.gz"; 9$h = gzopen($f,'r'); 10var_dump(stream_get_meta_data($h)); 11gzclose($h); 12echo "\nwith wrapper\n"; 13$f = "compress.zlib://".__DIR__."/004.txt.gz"; 14$h = fopen($f,'r'); 15var_dump(stream_get_meta_data($h)); 16gzclose($h); 17 18 19?> 20--EXPECTF-- 21no wrapper 22array(7) { 23 ["timed_out"]=> 24 bool(false) 25 ["blocked"]=> 26 bool(true) 27 ["eof"]=> 28 bool(false) 29 ["stream_type"]=> 30 string(4) "ZLIB" 31 ["mode"]=> 32 string(1) "r" 33 ["unread_bytes"]=> 34 int(0) 35 ["seekable"]=> 36 bool(true) 37} 38 39with wrapper 40array(9) { 41 ["timed_out"]=> 42 bool(false) 43 ["blocked"]=> 44 bool(true) 45 ["eof"]=> 46 bool(false) 47 ["wrapper_type"]=> 48 string(4) "ZLIB" 49 ["stream_type"]=> 50 string(4) "ZLIB" 51 ["mode"]=> 52 string(1) "r" 53 ["unread_bytes"]=> 54 int(0) 55 ["seekable"]=> 56 bool(true) 57 ["uri"]=> 58 string(%d) "compress.zlib://%s/004.txt.gz" 59} 60