18f9ec423SDave Kelsey--TEST--
204145dc2SVeres LajosTest function readgzfile() by substituting argument 2 with string values.
38f9ec423SDave Kelsey--SKIPIF--
48f9ec423SDave Kelsey<?php
58f9ec423SDave Kelseyif (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
68f9ec423SDave Kelsey?>
78f9ec423SDave Kelsey--FILE--
88f9ec423SDave Kelsey<?php
98f9ec423SDave Kelsey
108f9ec423SDave Kelsey
118f9ec423SDave Kelsey$filename = $filename = dirname(__FILE__)."/004.txt.gz";
128f9ec423SDave Kelsey
138f9ec423SDave Kelsey
148f9ec423SDave Kelsey$heredoc = <<<EOT
158f9ec423SDave Kelseyhello world
168f9ec423SDave KelseyEOT;
178f9ec423SDave Kelsey
188f9ec423SDave Kelsey$variation_array = array(
198f9ec423SDave Kelsey  'string DQ' => "string",
208f9ec423SDave Kelsey  'string SQ' => 'string',
218f9ec423SDave Kelsey  'mixed case string' => "sTrInG",
228f9ec423SDave Kelsey  'heredoc' => $heredoc
238f9ec423SDave Kelsey  );
248f9ec423SDave Kelsey
258f9ec423SDave Kelsey
268f9ec423SDave Kelseyforeach ( $variation_array as $var ) {
278f9ec423SDave Kelsey  var_dump(readgzfile( $filename, $var  ) );
288f9ec423SDave Kelsey}
298f9ec423SDave Kelsey?>
308f9ec423SDave Kelsey===DONE===
318f9ec423SDave Kelsey--EXPECTF--
32ce1d69a1SGabriel CarusoWarning: readgzfile() expects parameter 2 to be int, string given in %s on line %d
338f9ec423SDave KelseyNULL
348f9ec423SDave Kelsey
35ce1d69a1SGabriel CarusoWarning: readgzfile() expects parameter 2 to be int, string given in %s on line %d
368f9ec423SDave KelseyNULL
378f9ec423SDave Kelsey
38ce1d69a1SGabriel CarusoWarning: readgzfile() expects parameter 2 to be int, string given in %s on line %d
398f9ec423SDave KelseyNULL
408f9ec423SDave Kelsey
41ce1d69a1SGabriel CarusoWarning: readgzfile() expects parameter 2 to be int, string given in %s on line %d
428f9ec423SDave KelseyNULL
4306f072cbSJani Taskinen===DONE===
44