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-- 31Warning: readgzfile() expects parameter 2 to be integer, array given in %s on line %d 32NULL 33 34Warning: readgzfile() expects parameter 2 to be integer, array given in %s on line %d 35NULL 36 37Warning: readgzfile() expects parameter 2 to be integer, array given in %s on line %d 38NULL 39 40Warning: readgzfile() expects parameter 2 to be integer, array given in %s on line %d 41NULL 42===DONE=== 43