1--TEST-- 2Test function readgzfile() by substituting argument 2 with array values. 3--SKIPIF-- 4<?php 5if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); 6?> 7--FILE-- 8<?php 9 10 11$filename = dirname(__FILE__)."/004.txt.gz"; 12 13 14$index_array = array(1, 2, 3); 15$assoc_array = array(1 => 'one', 2 => 'two'); 16 17$variation = array( 18 'empty array' => array(), 19 'int indexed array' => $index_array, 20 'associative array' => $assoc_array, 21 'nested arrays' => array('foo', $index_array, $assoc_array), 22 ); 23 24 25foreach ( $variation as $var ) { 26 var_dump(readgzfile( $filename, $var ) ); 27} 28?> 29===DONE=== 30--EXPECTF-- 31 32Warning: readgzfile() expects parameter 2 to be long, array given in %s on line %d 33NULL 34 35Warning: readgzfile() expects parameter 2 to be long, array given in %s on line %d 36NULL 37 38Warning: readgzfile() expects parameter 2 to be long, array given in %s on line %d 39NULL 40 41Warning: readgzfile() expects parameter 2 to be long, array given in %s on line %d 42NULL 43===DONE===