xref: /PHP-8.0/ext/zlib/tests/004.phpt (revision d1764ca3)
1--TEST--
2gzfile() with various invalid params
3--SKIPIF--
4<?php if (!extension_loaded("zlib")) print "skip"; ?>
5--FILE--
6<?php
7
8var_dump(gzfile("nonexistent_file_gzfile",1));
9
10var_dump(gzfile(__DIR__."/004.txt.gz"));
11var_dump(gzfile(__DIR__."/004.txt.gz", 1));
12
13echo "Done\n";
14?>
15--EXPECTF--
16Warning: gzfile(nonexistent_file_gzfile): Failed to open stream: No such file or directory in %s on line %d
17bool(false)
18array(6) {
19  [0]=>
20  string(36) "When you're taught through feelings
21"
22  [1]=>
23  string(26) "Destiny flying high above
24"
25  [2]=>
26  string(38) "all I know is that you can realize it
27"
28  [3]=>
29  string(18) "Destiny who cares
30"
31  [4]=>
32  string(19) "as it turns around
33"
34  [5]=>
35  string(39) "and I know that it descends down on me
36"
37}
38array(6) {
39  [0]=>
40  string(36) "When you're taught through feelings
41"
42  [1]=>
43  string(26) "Destiny flying high above
44"
45  [2]=>
46  string(38) "all I know is that you can realize it
47"
48  [3]=>
49  string(18) "Destiny who cares
50"
51  [4]=>
52  string(19) "as it turns around
53"
54  [5]=>
55  string(39) "and I know that it descends down on me
56"
57}
58Done
59