1--TEST--
2Test function readgzfile() by substituting argument 2 with emptyUnsetUndefNull 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$unset_var = 10;
15unset($unset_var);
16
17$variation = array(
18  'unset var' => @$unset_var,
19  'undefined var' => @$undefined_var,
20  'empty string DQ' => "",
21  'empty string SQ' => '',
22  'uppercase NULL' => NULL,
23  'lowercase null' => null,
24  );
25
26
27foreach ( $variation as $var ) {
28  var_dump(readgzfile( $filename, $var  ) );
29}
30?>
31===DONE===
32--EXPECTF--
33When you're taught through feelings
34Destiny flying high above
35all I know is that you can realize it
36Destiny who cares
37as it turns around
38and I know that it descends down on me
39int(176)
40When you're taught through feelings
41Destiny flying high above
42all I know is that you can realize it
43Destiny who cares
44as it turns around
45and I know that it descends down on me
46int(176)
47
48Warning: readgzfile() expects parameter 2 to be long, string given in %s on line %d
49NULL
50
51Warning: readgzfile() expects parameter 2 to be long, string given in %s on line %d
52NULL
53When you're taught through feelings
54Destiny flying high above
55all I know is that you can realize it
56Destiny who cares
57as it turns around
58and I know that it descends down on me
59int(176)
60When you're taught through feelings
61Destiny flying high above
62all I know is that you can realize it
63Destiny who cares
64as it turns around
65and I know that it descends down on me
66int(176)
67===DONE===