summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/004.phpt
blob: b8d0f0eccd2c120a823f2db8e1441926bd89fd28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--TEST--
gzfile() with various invalid params
--SKIPIF--
<?php if (!extension_loaded("zlib")) print "skip"; ?>
--FILE--
<?php

var_dump(gzfile());
var_dump(gzfile("nonexistent_file_gzfile",1));
var_dump(gzfile(1,1,1));

var_dump(gzfile(dirname(__FILE__)."/004.txt.gz"));
var_dump(gzfile(dirname(__FILE__)."/004.txt.gz", 1));

echo "Done\n";
?>
--EXPECTF--
Warning: gzfile() expects at least 1 parameter, 0 given in %s on line %d
NULL

Warning: gzfile(nonexistent_file_gzfile): failed to open stream: No such file or directory in %s on line %d
bool(false)

Warning: gzfile() expects at most 2 parameters, 3 given in %s on line %d
NULL
array(6) {
  [0]=>
  string(36) "When you're taught through feelings
"
  [1]=>
  string(26) "Destiny flying high above
"
  [2]=>
  string(38) "all I know is that you can realize it
"
  [3]=>
  string(18) "Destiny who cares
"
  [4]=>
  string(19) "as it turns around
"
  [5]=>
  string(39) "and I know that it descends down on me
"
}
array(6) {
  [0]=>
  string(36) "When you're taught through feelings
"
  [1]=>
  string(26) "Destiny flying high above
"
  [2]=>
  string(38) "all I know is that you can realize it
"
  [3]=>
  string(18) "Destiny who cares
"
  [4]=>
  string(19) "as it turns around
"
  [5]=>
  string(39) "and I know that it descends down on me
"
}
Done