Annotation of embedaddon/php/ext/zlib/tests/004.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: gzfile() with various invalid params
3: --SKIPIF--
4: <?php if (!extension_loaded("zlib")) print "skip"; ?>
5: --FILE--
6: <?php
7:
8: var_dump(gzfile());
9: var_dump(gzfile("nonexistent_file_gzfile",1));
10: var_dump(gzfile(1,1,1));
11:
12: var_dump(gzfile(dirname(__FILE__)."/004.txt.gz"));
13: var_dump(gzfile(dirname(__FILE__)."/004.txt.gz", 1));
14:
15: ini_set("magic_quotes_runtime", 1);
16: var_dump(gzfile(dirname(__FILE__)."/004.txt.gz", -1));
17:
18: echo "Done\n";
19: ?>
20: --EXPECTF--
21: Warning: gzfile() expects at least 1 parameter, 0 given in %s on line %d
22: NULL
23:
24: Warning: gzfile(nonexistent_file_gzfile): failed to open stream: No such file or directory in %s on line %d
25: bool(false)
26:
27: Warning: gzfile() expects at most 2 parameters, 3 given in %s on line %d
28: NULL
29: array(6) {
30: [0]=>
31: string(36) "When you're taught through feelings
32: "
33: [1]=>
34: string(26) "Destiny flying high above
35: "
36: [2]=>
37: string(38) "all I know is that you can realize it
38: "
39: [3]=>
40: string(18) "Destiny who cares
41: "
42: [4]=>
43: string(19) "as it turns around
44: "
45: [5]=>
46: string(39) "and I know that it descends down on me
47: "
48: }
49: array(6) {
50: [0]=>
51: string(36) "When you're taught through feelings
52: "
53: [1]=>
54: string(26) "Destiny flying high above
55: "
56: [2]=>
57: string(38) "all I know is that you can realize it
58: "
59: [3]=>
60: string(18) "Destiny who cares
61: "
62: [4]=>
63: string(19) "as it turns around
64: "
65: [5]=>
66: string(39) "and I know that it descends down on me
67: "
68: }
69: array(6) {
70: [0]=>
71: string(37) "When you\'re taught through feelings
72: "
73: [1]=>
74: string(26) "Destiny flying high above
75: "
76: [2]=>
77: string(38) "all I know is that you can realize it
78: "
79: [3]=>
80: string(18) "Destiny who cares
81: "
82: [4]=>
83: string(19) "as it turns around
84: "
85: [5]=>
86: string(39) "and I know that it descends down on me
87: "
88: }
89: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>