1
1
--TEST--
2
- Test gzopen() function : usage variation
2
+ Test gzopen() function : usage variation
3
3
--SKIPIF--
4
- <?php
4
+ <?php
5
5
if (!extension_loaded ("zlib " )) {
6
- print "skip - zlib extension not loaded " ;
7
- }
6
+ print "skip - zlib extension not loaded " ;
7
+ }
8
8
?>
9
9
--FILE--
10
10
<?php
11
11
/* Prototype : resource gzopen(string filename, string mode [, int use_include_path])
12
- * Description: Open a .gz-file and return a .gz-file pointer
12
+ * Description: Open a .gz-file and return a .gz-file pointer
13
13
* Source code: ext/zlib/zlib.c
14
- * Alias to functions:
14
+ * Alias to functions:
15
15
*/
16
16
17
17
echo "*** Testing gzopen() : usage variation *** \n" ;
@@ -102,9 +102,9 @@ $inputs = array(
102
102
103
103
// unset data
104
104
'unset var ' => @$ unset_var ,
105
-
105
+
106
106
// resource variable
107
- 'resource ' => $ fp
107
+ 'resource ' => $ fp
108
108
);
109
109
110
110
// loop through each element of the array for filename
@@ -158,19 +158,19 @@ Error: 2 - gzopen(0.5): failed to open stream: No such file or directory, %s(%d)
158
158
bool(false)
159
159
160
160
--empty array--
161
- Error: 2 - gzopen() expects parameter 1 to be string , array given, %s(%d)
161
+ Error: 2 - gzopen() expects parameter 1 to be a valid path , array given, %s(%d)
162
162
NULL
163
163
164
164
--int indexed array--
165
- Error: 2 - gzopen() expects parameter 1 to be string , array given, %s(%d)
165
+ Error: 2 - gzopen() expects parameter 1 to be a valid path , array given, %s(%d)
166
166
NULL
167
167
168
168
--associative array--
169
- Error: 2 - gzopen() expects parameter 1 to be string , array given, %s(%d)
169
+ Error: 2 - gzopen() expects parameter 1 to be a valid path , array given, %s(%d)
170
170
NULL
171
171
172
172
--nested arrays--
173
- Error: 2 - gzopen() expects parameter 1 to be string , array given, %s(%d)
173
+ Error: 2 - gzopen() expects parameter 1 to be a valid path , array given, %s(%d)
174
174
NULL
175
175
176
176
--uppercase NULL--
@@ -210,7 +210,7 @@ Error: 2 - gzopen(Class A object): failed to open stream: No such file or direct
210
210
bool(false)
211
211
212
212
--instance of classWithoutToString--
213
- Error: 2 - gzopen() expects parameter 1 to be string , object given, %s(%d)
213
+ Error: 2 - gzopen() expects parameter 1 to be a valid path , object given, %s(%d)
214
214
NULL
215
215
216
216
--undefined var--
@@ -222,7 +222,7 @@ Error: 2 - gzopen(): Filename cannot be empty, %s(%d)
222
222
bool(false)
223
223
224
224
--resource--
225
- Error: 2 - gzopen() expects parameter 1 to be string , resource given, %s(%d)
225
+ Error: 2 - gzopen() expects parameter 1 to be a valid path , resource given, %s(%d)
226
226
NULL
227
227
===DONE===
228
228
0 commit comments