18f9ec423SDave Kelsey--TEST--
204145dc2SVeres LajosTest function readgzfile() by substituting argument 2 with emptyUnsetUndefNull 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 = dirname(__FILE__)."/004.txt.gz";
128f9ec423SDave Kelsey
138f9ec423SDave Kelsey
148f9ec423SDave Kelsey$unset_var = 10;
158f9ec423SDave Kelseyunset($unset_var);
168f9ec423SDave Kelsey
178f9ec423SDave Kelsey$variation = array(
188f9ec423SDave Kelsey  'unset var' => @$unset_var,
198f9ec423SDave Kelsey  'undefined var' => @$undefined_var,
208f9ec423SDave Kelsey  'empty string DQ' => "",
218f9ec423SDave Kelsey  'empty string SQ' => '',
228f9ec423SDave Kelsey  'uppercase NULL' => NULL,
238f9ec423SDave Kelsey  'lowercase null' => null,
248f9ec423SDave Kelsey  );
258f9ec423SDave Kelsey
268f9ec423SDave Kelsey
278f9ec423SDave Kelseyforeach ( $variation as $var ) {
288f9ec423SDave Kelsey  var_dump(readgzfile( $filename, $var  ) );
298f9ec423SDave Kelsey}
308f9ec423SDave Kelsey?>
318f9ec423SDave Kelsey===DONE===
328f9ec423SDave Kelsey--EXPECTF--
338f9ec423SDave KelseyWhen you're taught through feelings
348f9ec423SDave KelseyDestiny flying high above
358f9ec423SDave Kelseyall I know is that you can realize it
368f9ec423SDave KelseyDestiny who cares
378f9ec423SDave Kelseyas it turns around
388f9ec423SDave Kelseyand I know that it descends down on me
398f9ec423SDave Kelseyint(176)
408f9ec423SDave KelseyWhen you're taught through feelings
418f9ec423SDave KelseyDestiny flying high above
428f9ec423SDave Kelseyall I know is that you can realize it
438f9ec423SDave KelseyDestiny who cares
448f9ec423SDave Kelseyas it turns around
458f9ec423SDave Kelseyand I know that it descends down on me
468f9ec423SDave Kelseyint(176)
478f9ec423SDave Kelsey
48ce1d69a1SGabriel CarusoWarning: readgzfile() expects parameter 2 to be int, string given in %s on line %d
498f9ec423SDave KelseyNULL
508f9ec423SDave Kelsey
51ce1d69a1SGabriel CarusoWarning: readgzfile() expects parameter 2 to be int, string given in %s on line %d
528f9ec423SDave KelseyNULL
538f9ec423SDave KelseyWhen you're taught through feelings
548f9ec423SDave KelseyDestiny flying high above
558f9ec423SDave Kelseyall I know is that you can realize it
568f9ec423SDave KelseyDestiny who cares
578f9ec423SDave Kelseyas it turns around
588f9ec423SDave Kelseyand I know that it descends down on me
598f9ec423SDave Kelseyint(176)
608f9ec423SDave KelseyWhen you're taught through feelings
618f9ec423SDave KelseyDestiny flying high above
628f9ec423SDave Kelseyall I know is that you can realize it
638f9ec423SDave KelseyDestiny who cares
648f9ec423SDave Kelseyas it turns around
658f9ec423SDave Kelseyand I know that it descends down on me
668f9ec423SDave Kelseyint(176)
67b746e698SPeter Kokot===DONE===
68