1 /*
2    +----------------------------------------------------------------------+
3    | Zend Engine, Func Info                                               |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1998-2018 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Authors: Dmitry Stogov <dmitry@zend.com>                             |
16    +----------------------------------------------------------------------+
17 */
18 
19 /* $Id:$ */
20 
21 #include "php.h"
22 #include "zend_compile.h"
23 #include "zend_extensions.h"
24 #include "zend_ssa.h"
25 #include "zend_optimizer_internal.h"
26 #include "zend_inference.h"
27 #include "zend_call_graph.h"
28 #include "zend_func_info.h"
29 #include "zend_inference.h"
30 
31 typedef uint32_t (*info_func_t)(const zend_call_info *call_info, const zend_ssa *ssa);
32 
33 typedef struct _func_info_t {
34 	const char *name;
35 	int         name_len;
36 	uint32_t    info;
37 	info_func_t info_func;
38 } func_info_t;
39 
40 #define F0(name, info) \
41 	{name, sizeof(name)-1, (FUNC_MAY_WARN | (info)), NULL}
42 #define F1(name, info) \
43 	{name, sizeof(name)-1, (FUNC_MAY_WARN | MAY_BE_RC1 | (info)), NULL}
44 #define FN(name, info) \
45 	{name, sizeof(name)-1, (FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_RCN | (info)), NULL}
46 #define FR(name, info) \
47 	{name, sizeof(name)-1, (FUNC_MAY_WARN | MAY_BE_REF | (info)), NULL}
48 #define FX(name, info) \
49 	{name, sizeof(name)-1, (FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | (info)), NULL}
50 #define I0(name, info) \
51 	{name, sizeof(name)-1, (info), NULL}
52 #define I1(name, info) \
53 	{name, sizeof(name)-1, (MAY_BE_RC1 | (info)), NULL}
54 #define IN(name, info) \
55 	{name, sizeof(name)-1, (MAY_BE_RC1 | MAY_BE_RCN | (info)), NULL}
56 #define FC(name, callback) \
57 	{name, sizeof(name)-1, 0, callback}
58 
zend_strlen_info(const zend_call_info * call_info,const zend_ssa * ssa)59 static uint32_t zend_strlen_info(const zend_call_info *call_info, const zend_ssa *ssa)
60 {
61 	if (call_info->caller_init_opline->extended_value == (uint32_t)call_info->num_args &&
62 	    call_info->num_args == 1) {
63 
64 		uint32_t tmp = 0;
65 		if (call_info->arg_info[0].opline) {
66 			uint32_t arg_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
67 
68 			if (arg_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) {
69 				tmp |= MAY_BE_LONG;
70 			}
71 			if (arg_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
72 				/* warning, and returns NULL */
73 				tmp |= FUNC_MAY_WARN | MAY_BE_NULL;
74 			}
75 		} else {
76 			tmp |= MAY_BE_LONG | FUNC_MAY_WARN | MAY_BE_NULL;
77 		}
78 		return tmp;
79 	} else {
80 		/* warning, and returns NULL */
81 		return FUNC_MAY_WARN | MAY_BE_NULL;
82 	}
83 }
84 
zend_dechex_info(const zend_call_info * call_info,const zend_ssa * ssa)85 static uint32_t zend_dechex_info(const zend_call_info *call_info, const zend_ssa *ssa)
86 {
87 	if (call_info->caller_init_opline->extended_value == (uint32_t)call_info->num_args &&
88 	    call_info->num_args == 1) {
89 		return MAY_BE_RC1 | MAY_BE_STRING;
90 	} else {
91 		/* warning, and returns NULL */
92 		return FUNC_MAY_WARN | MAY_BE_NULL;
93 	}
94 }
95 
zend_range_info(const zend_call_info * call_info,const zend_ssa * ssa)96 static uint32_t zend_range_info(const zend_call_info *call_info, const zend_ssa *ssa)
97 {
98 	if (call_info->caller_init_opline->extended_value == (uint32_t)call_info->num_args &&
99 	    (call_info->num_args == 2 || call_info->num_args == 3)) {
100 
101 		uint32_t t1 = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
102 		uint32_t t2 = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[1].opline);
103 		uint32_t t3 = 0;
104 		uint32_t tmp = FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG;
105 
106 		if (call_info->num_args == 3) {
107 			t3 = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[2].opline);
108 		}
109 		if ((t1 & MAY_BE_STRING) && (t2 & MAY_BE_STRING)) {
110 			tmp |= MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING;
111 		}
112 		if ((t1 & (MAY_BE_DOUBLE|MAY_BE_STRING))
113 				|| (t2 & (MAY_BE_DOUBLE|MAY_BE_STRING))
114 				|| (t3 & (MAY_BE_DOUBLE|MAY_BE_STRING))) {
115 			tmp |= MAY_BE_ARRAY_OF_DOUBLE;
116 		}
117 		if ((t1 & (MAY_BE_ANY-(MAY_BE_STRING|MAY_BE_DOUBLE))) && (t2 & (MAY_BE_ANY-(MAY_BE_STRING|MAY_BE_DOUBLE)))) {
118 			if ((t3 & MAY_BE_ANY) != MAY_BE_DOUBLE) {
119 				tmp |= MAY_BE_ARRAY_OF_LONG;
120 			}
121 		}
122 		return tmp;
123 	} else {
124 		/* may warning, and return FALSE */
125 		return FUNC_MAY_WARN | MAY_BE_RC1 | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING;
126 	}
127 }
128 
zend_is_type_info(const zend_call_info * call_info,const zend_ssa * ssa)129 static uint32_t zend_is_type_info(const zend_call_info *call_info, const zend_ssa *ssa)
130 {
131 	if (call_info->caller_init_opline->extended_value == (uint32_t)call_info->num_args &&
132 	    call_info->num_args == 1) {
133 		return MAY_BE_FALSE | MAY_BE_TRUE;
134 	} else {
135 		return MAY_BE_FALSE | MAY_BE_TRUE | FUNC_MAY_WARN;
136 	}
137 }
138 
zend_l_ss_info(const zend_call_info * call_info,const zend_ssa * ssa)139 static uint32_t zend_l_ss_info(const zend_call_info *call_info, const zend_ssa *ssa)
140 {
141 	if (call_info->caller_init_opline->extended_value == (uint32_t)call_info->num_args &&
142 	    call_info->num_args == 2) {
143 
144 		uint32_t arg1_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
145 		uint32_t arg2_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[1].opline);
146 		uint32_t tmp = 0;
147 
148 		if ((arg1_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) &&
149 		    (arg2_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT))) {
150 			tmp |= MAY_BE_LONG;
151 		}
152 		if ((arg1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) ||
153 		    (arg2_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) {
154 			/* warning, and returns NULL */
155 			tmp |= FUNC_MAY_WARN | MAY_BE_NULL;
156 		}
157 		return tmp;
158 	} else {
159 		/* warning, and returns NULL */
160 		return FUNC_MAY_WARN | MAY_BE_NULL | MAY_BE_LONG;
161 	}
162 }
163 
zend_lb_ssn_info(const zend_call_info * call_info,const zend_ssa * ssa)164 static uint32_t zend_lb_ssn_info(const zend_call_info *call_info, const zend_ssa *ssa)
165 {
166 	if (call_info->caller_init_opline->extended_value == (uint32_t)call_info->num_args &&
167 	    call_info->num_args == 3) {
168 		uint32_t arg1_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
169 		uint32_t arg2_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[1].opline);
170 		uint32_t arg3_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[2].opline);
171 		uint32_t tmp = 0;
172 
173 		if ((arg1_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) &&
174 		    (arg2_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) &&
175 		    (arg3_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT))) {
176 			tmp |= MAY_BE_LONG | MAY_BE_FALSE;
177 		}
178 		if ((arg1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) ||
179 		    (arg2_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) ||
180 		    (arg3_info & (MAY_BE_STRING|MAY_BE_RESOURCE|MAY_BE_ARRAY|MAY_BE_OBJECT))) {
181 			/* warning, and returns NULL */
182 			tmp |= FUNC_MAY_WARN | MAY_BE_NULL;
183 		}
184 		return tmp;
185 	} else {
186 		/* warning, and returns NULL */
187 		return FUNC_MAY_WARN | MAY_BE_NULL | MAY_BE_LONG;
188 	}
189 }
190 
zend_b_s_info(const zend_call_info * call_info,const zend_ssa * ssa)191 static uint32_t zend_b_s_info(const zend_call_info *call_info, const zend_ssa *ssa)
192 {
193 	if (call_info->caller_init_opline->extended_value == (uint32_t)call_info->num_args &&
194 	    call_info->num_args == 1) {
195 
196 		uint32_t arg1_info = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[0].opline);
197 		uint32_t tmp = 0;
198 
199 		if (arg1_info & (MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT)) {
200 			tmp |= MAY_BE_FALSE | MAY_BE_TRUE;
201 		}
202 		if (arg1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
203 			/* warning, and returns NULL */
204 			tmp |= FUNC_MAY_WARN | MAY_BE_NULL;
205 		}
206 		return tmp;
207 	} else {
208 		/* warning, and returns NULL */
209 		return FUNC_MAY_WARN | MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE;
210 	}
211 }
212 
213 #define UNKNOWN_INFO (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF)
214 
215 static const func_info_t func_infos[] = {
216 	/* zend */
217 	I1("zend_version",            MAY_BE_STRING),
218 	I0("gc_collect_cycles",       MAY_BE_LONG),
219 	I0("gc_enabled",              MAY_BE_FALSE | MAY_BE_TRUE),
220 	F0("gc_enable",               MAY_BE_NULL),
221 	F0("gc_disable",              MAY_BE_NULL),
222 	F0("func_num_args",           MAY_BE_LONG),
223 	FN("func_get_arg",            UNKNOWN_INFO),
224 	F1("func_get_args",           MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
225 	FC("strlen",                  zend_strlen_info),
226 	FC("strcmp",                  zend_l_ss_info),
227 	FC("strncmp",                 zend_lb_ssn_info),
228 	FC("strcasecmp",              zend_l_ss_info),
229 	FC("strncasecmp",             zend_lb_ssn_info),
230 	F1("each",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_KEY_ANY),
231 	F0("error_reporting",         MAY_BE_NULL | MAY_BE_LONG),
232 	F0("define",                  MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_NULL), // TODO: inline
233 	FC("defined",                 zend_b_s_info), // TODO: inline
234 	FN("get_class",               MAY_BE_FALSE | MAY_BE_STRING),
235 	FN("get_called_class",        MAY_BE_FALSE | MAY_BE_STRING),
236 	FN("get_parrent_class",       MAY_BE_FALSE | MAY_BE_STRING),
237 	F0("is_subclass_of",          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline
238 	F0("is_a",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline
239 	F1("get_class_vars",          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
240 	FN("get_object_vars",         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
241 	F1("get_class_methods",       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
242 	F0("method_exists",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
243 	F0("property_exists",         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
244 	F0("class_exists",            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
245 	F0("interface_exists",        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
246 	F0("trait_exists",            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
247 	FC("function_exists",         zend_b_s_info), // TODO: inline
248 	F0("class_alias",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
249 	F1("get_included_files",      MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
250 	F0("trigger_error",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
251 	F0("user_error",              MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
252 	FN("set_error_handler",       MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_OBJECT | MAY_BE_OBJECT),
253 	I0("restore_error_handler",   MAY_BE_NULL | MAY_BE_TRUE),
254 	F1("get_declared_traits",     MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
255 	F1("get_declared_classes",    MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
256 	F1("get_declared_interfaces", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
257 	F1("get_defined_functions",   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
258 	I1("get_defined_vars",        MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF),
259 	FN("create_function",         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
260 	F1("get_resource_type",       MAY_BE_NULL | MAY_BE_STRING),
261 	F1("get_defined_constants",   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_RESOURCE | MAY_BE_ARRAY_OF_ARRAY),
262 	F0("debug_print_backtrace",   MAY_BE_NULL),
263 	F1("debug_backtrace",         MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY),
264 	F1("get_loaded_extensions",   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
265 	FC("extension_loaded",        zend_b_s_info),
266 	F1("get_extension_funcs",     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
267 
268 	/* ext/statdard */
269 	FN("constant",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING | MAY_BE_RESOURCE),
270 	F1("bin2hex",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
271 	F1("hex2bin",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
272 	F0("sleep",                        MAY_BE_FALSE | MAY_BE_LONG),
273 	F0("usleep",                       MAY_BE_NULL | MAY_BE_FALSE),
274 #if HAVE_NANOSLEEP
275 	F0("time_nanosleep",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
276 	F0("time_sleep_until",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
277 #endif
278 #if HAVE_STRPTIME
279 	F1("strptime",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
280 #endif
281 	F0("flush",                        MAY_BE_NULL),
282 	F1("wordwrap",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
283 	F1("htmlspecialchars",             MAY_BE_NULL | MAY_BE_STRING),
284 	F1("htmlentities",                 MAY_BE_NULL | MAY_BE_STRING),
285 	F1("html_entity_decode",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
286 	F1("htmlspecialchars_decode",      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
287 	F1("get_html_translation_table",   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
288 	F1("sha1",                         MAY_BE_NULL | MAY_BE_STRING),
289 	F1("sha1_file",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
290 	F1("md5",                          MAY_BE_NULL | MAY_BE_STRING),
291 	F1("md5_file",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
292 	F0("crc32",                        MAY_BE_NULL | MAY_BE_LONG),
293 	F1("iptcparse",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
294 	F1("iptcembed",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
295 	F1("getimagesize",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
296 	F1("getimagesizefromstring",       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
297 	F1("image_type_to_mime_type",      MAY_BE_NULL | MAY_BE_STRING),
298 	F1("image_type_to_extension",      MAY_BE_FALSE | MAY_BE_STRING),
299 	F0("phpinfo",                      MAY_BE_NULL | MAY_BE_TRUE),
300 	F1("phpversion",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
301 	F0("phpcredits",                   MAY_BE_NULL | MAY_BE_TRUE),
302 	F1("php_sapi_name",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
303 	F1("php_uname",                    MAY_BE_NULL | MAY_BE_STRING),
304 	F1("php_ini_scanned_files",        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
305 	F1("php_ini_loaded_file",          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
306 	F0("strnatcmp",                    MAY_BE_NULL | MAY_BE_LONG),
307 	F0("strnatcasecmp",                MAY_BE_NULL | MAY_BE_LONG),
308 	F0("substr_count",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
309 	F0("strspn",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
310 	F0("strcspn",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
311 	F1("strtok",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
312 	FN("strtoupper",                   MAY_BE_NULL | MAY_BE_STRING),
313 	FN("strtolower",                   MAY_BE_NULL | MAY_BE_STRING),
314 	F0("strpos",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
315 	F0("stripos",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
316 	F0("strrpos",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
317 	F0("strripos",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
318 	F1("strrev",                       MAY_BE_NULL | MAY_BE_STRING),
319 	F1("hebrev",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
320 	F1("hebrevc",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
321 	F1("nl2br",                        MAY_BE_NULL | MAY_BE_STRING),
322 	F1("basename",                     MAY_BE_NULL | MAY_BE_STRING),
323 	F1("dirname",                      MAY_BE_NULL | MAY_BE_STRING),
324 	F1("pathinfo",                     MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
325 	F1("stripslashes",                 MAY_BE_NULL | MAY_BE_STRING),
326 	F1("stripcslashes",                MAY_BE_NULL | MAY_BE_STRING),
327 	F1("strstr",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
328 	F1("stristr",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
329 	F1("strrchr",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
330 	F1("str_shuffle",                  MAY_BE_NULL | MAY_BE_STRING),
331 	F1("str_word_count",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
332 	F1("str_split",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
333 	F1("strpbrk",                      MAY_BE_FALSE | MAY_BE_STRING),
334 	F0("substr_compare",               MAY_BE_FALSE | MAY_BE_LONG),
335 #ifdef HAVE_STRCOLL
336 	F0("strcoll",                      MAY_BE_NULL | MAY_BE_LONG),
337 #endif
338 #ifdef HAVE_STRFMON
339 	F1("money_format",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
340 #endif
341 	F1("substr",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
342 	FN("substr_replace",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
343 	F1("quotemeta",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
344 	F1("ucfirst",                      MAY_BE_NULL | MAY_BE_STRING),
345 	F1("lcfirst",                      MAY_BE_NULL | MAY_BE_STRING),
346 	F1("ucwords",                      MAY_BE_NULL | MAY_BE_STRING),
347 	FN("strtr",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
348 	FN("addslashes",                   MAY_BE_NULL | MAY_BE_STRING),
349 	F1("addcslashes",                  MAY_BE_NULL | MAY_BE_STRING),
350 	FN("rtrim",                        MAY_BE_NULL | MAY_BE_STRING),
351 	FN("str_replace",                  MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT),
352 	FN("str_ireplace",                 MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY | MAY_BE_ARRAY_OF_OBJECT),
353 	F1("str_repeat",                   MAY_BE_NULL | MAY_BE_STRING),
354 	F1("count_chars",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
355 	F1("chunk_split",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
356 	FN("trim",                         MAY_BE_NULL | MAY_BE_STRING),
357 	FN("ltrim",                        MAY_BE_NULL | MAY_BE_STRING),
358 	F1("strip_tags",                   MAY_BE_NULL | MAY_BE_STRING),
359 	F0("similar_text",                 MAY_BE_NULL | MAY_BE_LONG),
360 	F1("explode",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
361 	FN("implode",                      MAY_BE_NULL | MAY_BE_STRING),
362 	FN("join",                         MAY_BE_NULL | MAY_BE_STRING),
363 	FN("setlocale",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
364 	F1("localeconv",                   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
365 #if HAVE_NL_LANGINFO
366 	F1("nl_langinfo",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
367 #endif
368 	F1("soundex",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
369 	F0("levenshtein",                  MAY_BE_NULL | MAY_BE_LONG),
370 	F1("chr",                          MAY_BE_NULL | MAY_BE_STRING),
371 	F0("ord",                          MAY_BE_NULL | MAY_BE_LONG),
372 	F0("parse_str",                    MAY_BE_NULL),
373 	F1("str_getcsv",                   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
374 	F1("str_pad",                      MAY_BE_NULL | MAY_BE_STRING),
375 	F1("chop",                         MAY_BE_NULL | MAY_BE_STRING),
376 	F1("strchr",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
377 	F1("sprintf",                      MAY_BE_FALSE | MAY_BE_STRING),
378 	F0("printf",                       MAY_BE_FALSE | MAY_BE_LONG),
379 	F0("vprintf",                      MAY_BE_FALSE | MAY_BE_LONG),
380 	F1("vsprintf",                     MAY_BE_FALSE | MAY_BE_STRING),
381 	F0("fprintf",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
382 	F0("vfprintf",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
383 	F1("sscanf",                       MAY_BE_NULL | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
384 	F1("fscanf",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
385 	F1("parse_url",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_LONG),
386 	F1("urlencode",                    MAY_BE_NULL | MAY_BE_STRING),
387 	F1("urldecode",                    MAY_BE_NULL | MAY_BE_STRING),
388 	F1("rawurlencode",                 MAY_BE_NULL | MAY_BE_STRING),
389 	F1("rawurldecode",                 MAY_BE_NULL | MAY_BE_STRING),
390 	F1("http_build_query",             MAY_BE_FALSE | MAY_BE_STRING),
391 #if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
392 	F1("readlink",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
393 	F0("linkinfo",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
394 	F0("symlink",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
395 	F0("link",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
396 #endif
397 	F0("unlink",                       MAY_BE_FALSE | MAY_BE_TRUE),
398 	F1("exec",                         MAY_BE_FALSE | MAY_BE_STRING),
399 	F1("system",                       MAY_BE_FALSE | MAY_BE_STRING),
400 	F1("escapeshellcmd",               MAY_BE_NULL | MAY_BE_STRING),
401 	F1("escapeshellarg",               MAY_BE_NULL | MAY_BE_STRING),
402 	F1("passthru",                     MAY_BE_FALSE | MAY_BE_STRING),
403 	F1("shell_exec",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
404 #ifdef PHP_CAN_SUPPORT_PROC_OPEN
405 	F1("proc_open",                    MAY_BE_FALSE | MAY_BE_RESOURCE),
406 	F0("proc_close",                   MAY_BE_FALSE | MAY_BE_LONG),
407 	F0("proc_terminate",               MAY_BE_FALSE | MAY_BE_TRUE),
408 	F1("proc_get_status",              MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
409 #endif
410 #ifdef HAVE_NICE
411 	F0("proc_nice",                    MAY_BE_FALSE | MAY_BE_TRUE),
412 #endif
413 	F0("rand",                         MAY_BE_NULL | MAY_BE_LONG),
414 	F0("srand",                        MAY_BE_NULL),
415 	F0("getrandmax",                   MAY_BE_NULL | MAY_BE_LONG),
416 	F0("mt_rand",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
417 	F0("mt_srand",                     MAY_BE_NULL),
418 	F0("mt_getrandmax",                MAY_BE_NULL | MAY_BE_LONG),
419 #if HAVE_GETSERVBYNAME
420 	F0("getservbyname",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
421 #endif
422 #if HAVE_GETSERVBYPORT
423 	F1("getservbyport",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
424 #endif
425 #if HAVE_GETPROTOBYNAME
426 	F0("getprotobyname",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
427 #endif
428 #if HAVE_GETPROTOBYNUMBER
429 	F1("getprotobynumber",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
430 #endif
431 	F0("getmyuid",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
432 	F0("getmygid",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
433 	F0("getmypid",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
434 	F0("getmyinode",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
435 	F0("getlastmod",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
436 	F1("base64_decode",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
437 	F1("base64_encode",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
438 	F1("password_hash",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
439 	F1("password_get_info",            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
440 	F0("password_needs_rehash",        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
441 	F0("password_verify",              MAY_BE_FALSE | MAY_BE_TRUE),
442 	F1("convert_uuencode",             MAY_BE_FALSE | MAY_BE_STRING),
443 	F1("convert_uudecode",             MAY_BE_FALSE | MAY_BE_STRING),
444 	F0("abs",                          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE),
445 	F0("ceil",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
446 	F0("floor",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
447 	F0("round",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
448 	F0("sin",                          MAY_BE_NULL | MAY_BE_DOUBLE),
449 	F0("cos",                          MAY_BE_NULL | MAY_BE_DOUBLE),
450 	F0("tan",                          MAY_BE_NULL | MAY_BE_DOUBLE),
451 	F0("asin",                         MAY_BE_NULL | MAY_BE_DOUBLE),
452 	F0("acos",                         MAY_BE_NULL | MAY_BE_DOUBLE),
453 	F0("atan",                         MAY_BE_NULL | MAY_BE_DOUBLE),
454 	F0("atanh",                        MAY_BE_NULL | MAY_BE_DOUBLE),
455 	F0("atan2",                        MAY_BE_NULL | MAY_BE_DOUBLE),
456 	F0("sinh",                         MAY_BE_NULL | MAY_BE_DOUBLE),
457 	F0("cosh",                         MAY_BE_NULL | MAY_BE_DOUBLE),
458 	F0("tanh",                         MAY_BE_NULL | MAY_BE_DOUBLE),
459 	F0("asinh",                        MAY_BE_NULL | MAY_BE_DOUBLE),
460 	F0("acosh",                        MAY_BE_NULL | MAY_BE_DOUBLE),
461 	F0("expm1",                        MAY_BE_NULL | MAY_BE_DOUBLE),
462 	F0("log1p",                        MAY_BE_NULL | MAY_BE_DOUBLE),
463 	F0("pi",                           MAY_BE_DOUBLE),
464 	F0("is_finite",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
465 	F0("is_nan",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
466 	F0("is_infinite",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
467 	F0("pow",                          MAY_BE_NULL | MAY_BE_LONG | MAY_BE_DOUBLE),
468 	F0("exp",                          MAY_BE_NULL | MAY_BE_DOUBLE),
469 	F0("log",                          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
470 	F0("log10",                        MAY_BE_NULL | MAY_BE_DOUBLE),
471 	F0("sqrt",                         MAY_BE_NULL | MAY_BE_DOUBLE),
472 	F0("hypot",                        MAY_BE_NULL | MAY_BE_DOUBLE),
473 	F0("deg2rad",                      MAY_BE_NULL | MAY_BE_DOUBLE),
474 	F0("rad2deg",                      MAY_BE_NULL | MAY_BE_DOUBLE),
475 	F0("bindec",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE),
476 	F0("hexdec",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE),
477 	F0("octdec",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE),
478 	F1("decbin",                       MAY_BE_NULL | MAY_BE_STRING),
479 	F1("decoct",                       MAY_BE_NULL | MAY_BE_STRING),
480 	FC("dechex",                       zend_dechex_info),
481 	F1("base_convert",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
482 	F1("number_format",                MAY_BE_NULL | MAY_BE_STRING),
483 	F0("fmod",                         MAY_BE_NULL | MAY_BE_DOUBLE),
484 #ifdef HAVE_INET_NTOP
485 	F1("inet_ntop",                    MAY_BE_FALSE | MAY_BE_STRING),
486 #endif
487 #ifdef HAVE_INET_PTON
488 	F1("inet_pton",                    MAY_BE_FALSE | MAY_BE_STRING),
489 #endif
490 	F0("ip2long",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
491 	F1("long2ip",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
492 	F1("getenv",                       MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
493 #ifdef HAVE_PUTENV
494 	F0("putenv",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
495 #endif
496 	F1("getopt",                       MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
497 #ifdef HAVE_GETLOADAVG
498 	F1("sys_getloadavg",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_DOUBLE),
499 #endif
500 #ifdef HAVE_GETTIMEOFDAY
501 	F1("microtime",                    MAY_BE_NULL | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_STRING),
502 	F1("gettimeofday",                 MAY_BE_NULL | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_STRING),
503 #endif
504 #ifdef HAVE_GETRUSAGE
505 	F1("getrusage",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
506 #endif
507 #ifdef HAVE_GETTIMEOFDAY
508 	F1("uniqid",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
509 #endif
510 	F1("quoted_printable_decode",      MAY_BE_NULL | MAY_BE_STRING),
511 	F1("quoted_printable_encode",      MAY_BE_NULL | MAY_BE_STRING),
512 	F1("convert_cyr_string",           MAY_BE_NULL | MAY_BE_STRING),
513 	F1("get_current_user",             MAY_BE_NULL | MAY_BE_STRING),
514 	F0("set_time_limit",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
515 	F0("header_register_callback",     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
516 	F1("get_cfg_var",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
517 	F0("magic_quotes_runtime",         MAY_BE_NULL | MAY_BE_FALSE),
518 	F0("set_magic_quotes_runtime",     MAY_BE_NULL | MAY_BE_FALSE),
519 	F0("get_magic_quotes_gpc",         MAY_BE_NULL | MAY_BE_FALSE),
520 	F0("get_magic_quotes_runtime",     MAY_BE_NULL | MAY_BE_FALSE),
521 	F0("error_log",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
522 	F1("error_get_last",               MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
523 	FN("call_user_func",               UNKNOWN_INFO),
524 	FN("call_user_func_array",         UNKNOWN_INFO),
525 	FN("call_user_method",             UNKNOWN_INFO),
526 	FN("call_user_method_array",       UNKNOWN_INFO),
527 	FN("forward_static_call",          UNKNOWN_INFO),
528 	FN("forward_static_call_array",    UNKNOWN_INFO),
529 	F1("serialize",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
530 	FN("unserialize",                  UNKNOWN_INFO),
531 	F0("var_dump",                     MAY_BE_NULL),
532 	F1("var_export",                   MAY_BE_NULL | MAY_BE_STRING),
533 	F0("debug_zval_dump",              MAY_BE_NULL),
534 	F1("print_r",                      MAY_BE_FALSE | MAY_BE_STRING),
535 	F0("memory_get_usage",             MAY_BE_FALSE | MAY_BE_LONG),
536 	F0("memory_get_peak_usage",        MAY_BE_FALSE | MAY_BE_LONG),
537 	F0("register_shutdown_function",   MAY_BE_NULL | MAY_BE_FALSE),
538 	F0("register_tick_function",       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
539 	F0("unregister_tick_function",     MAY_BE_NULL),
540 	F1("highlight_file",               MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
541 	F1("show_source",                  MAY_BE_FALSE | MAY_BE_STRING),
542 	F1("highlight_string",             MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
543 	F1("php_strip_whitespace",         MAY_BE_FALSE | MAY_BE_STRING),
544 	F1("ini_get",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
545 	F1("ini_get_all",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
546 	F1("ini_set",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
547 	F1("ini_alter",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
548 	F0("ini_restore",                  MAY_BE_NULL),
549 	F1("get_include_path",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
550 	F1("set_include_path",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
551 	F0("restore_include_path",         MAY_BE_NULL),
552 	F0("setcookie",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
553 	F0("setrawcookie",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
554 	F0("header",                       MAY_BE_NULL),
555 	F0("header_remove",                MAY_BE_NULL),
556 	F0("headers_sent",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
557 	F1("headers_list",                 MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
558 	F0("http_response_code",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
559 	F0("connection_aborted",           MAY_BE_LONG),
560 	F0("connection_status",            MAY_BE_LONG),
561 	F0("ignore_user_abort",            MAY_BE_NULL | MAY_BE_LONG),
562 	F1("parse_ini_file",               MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
563 	F1("parse_ini_string",             MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
564 #if ZEND_DEBUG
565 	F1("config_get_hash",              MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
566 #endif
567 	F0("is_uploaded_file",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
568 	F0("move_uploaded_file",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
569 	F1("gethostbyaddr",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
570 	F1("gethostbyname",                MAY_BE_NULL | MAY_BE_STRING),
571 	F1("gethostbynamel",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
572 #ifdef HAVE_GETHOSTNAME
573 	F1("gethostname",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
574 #endif
575 #if defined(PHP_WIN32) || (HAVE_DNS_SEARCH_FUNC && !(defined(__BEOS__) || defined(NETWARE)))
576 	F0("dns_check_record",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
577 	F0("checkdnsrr",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
578 # if defined(PHP_WIN32) || HAVE_FULL_DNS_FUNCS
579 	F0("dns_get_mx",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
580 	F0("getmxrr",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
581 	F1("dns_get_record",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ARRAY),
582 # endif
583 #endif
584 	F0("intval",                       MAY_BE_NULL | MAY_BE_LONG),
585 	F0("floatval",                     MAY_BE_NULL | MAY_BE_DOUBLE),
586 	F0("doubleval",                    MAY_BE_NULL | MAY_BE_DOUBLE),
587 	FN("strval",                       MAY_BE_NULL | MAY_BE_STRING),
588 	F0("boolval",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
589 	F1("gettype",                      MAY_BE_NULL | MAY_BE_STRING),
590 	F0("settype",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
591 	FC("is_null",                      zend_is_type_info),
592 	F0("is_resource",                  MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline with support for closed resources
593 	FC("is_bool",                      zend_is_type_info),
594 	FC("is_long",                      zend_is_type_info),
595 	FC("is_float",                     zend_is_type_info),
596 	FC("is_int",                       zend_is_type_info),
597 	FC("is_integer",                   zend_is_type_info),
598 	FC("is_double",                    zend_is_type_info),
599 	FC("is_real",                      zend_is_type_info),
600 	F0("is_numeric",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
601 	FC("is_string",                    zend_is_type_info),
602 	FC("is_array",                     zend_is_type_info),
603 	F0("is_object",                    MAY_BE_FALSE | MAY_BE_TRUE), // TODO: inline with support for incomplete class
604 	F0("is_scalar",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
605 	F0("is_callable",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
606 	F0("pclose",                       MAY_BE_FALSE | MAY_BE_LONG),
607 	F1("popen",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
608 	F0("readfile",                     MAY_BE_FALSE | MAY_BE_LONG),
609 	F0("rewind",                       MAY_BE_FALSE | MAY_BE_TRUE),
610 	F0("rmdir",                        MAY_BE_FALSE | MAY_BE_TRUE),
611 	F0("umask",                        MAY_BE_FALSE | MAY_BE_LONG),
612 	F0("fclose",                       MAY_BE_FALSE | MAY_BE_TRUE),
613 	F0("feof",                         MAY_BE_FALSE | MAY_BE_TRUE),
614 	F1("fgetc",                        MAY_BE_FALSE | MAY_BE_STRING),
615 	F1("fgets",                        MAY_BE_FALSE | MAY_BE_STRING),
616 	F1("fgetss",                       MAY_BE_FALSE | MAY_BE_STRING),
617 	F1("fread",                        MAY_BE_FALSE | MAY_BE_STRING),
618 	F1("fopen",                        MAY_BE_FALSE | MAY_BE_RESOURCE),
619 	F0("fpassthru",                    MAY_BE_FALSE | MAY_BE_LONG),
620 	F0("ftruncate",                    MAY_BE_FALSE | MAY_BE_TRUE),
621 	F1("fstat",                        MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG),
622 	F0("fseek",                        MAY_BE_FALSE | MAY_BE_LONG),
623 	F0("ftell",                        MAY_BE_FALSE | MAY_BE_LONG),
624 	F0("fflush",                       MAY_BE_FALSE | MAY_BE_TRUE),
625 	F0("fwrite",                       MAY_BE_FALSE | MAY_BE_LONG),
626 	F0("fputs",                        MAY_BE_FALSE | MAY_BE_LONG),
627 	F0("mkdir",                        MAY_BE_FALSE | MAY_BE_TRUE),
628 	F0("rename",                       MAY_BE_FALSE | MAY_BE_TRUE),
629 	F0("copy",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
630 	F1("tempnam",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
631 	F1("tmpfile",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
632 	F1("file",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
633 	F1("file_get_contents",            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
634 	F0("file_put_contents",            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
635 	F0("stream_select",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
636 	F1("stream_context_create",        MAY_BE_FALSE | MAY_BE_RESOURCE),
637 	F0("stream_context_set_params",    MAY_BE_FALSE | MAY_BE_TRUE),
638 	F1("stream_context_get_params",    MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
639 	F0("stream_context_set_option",    MAY_BE_FALSE | MAY_BE_TRUE),
640 	FN("stream_context_get_options",   MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
641 	FN("stream_context_get_default",   MAY_BE_FALSE | MAY_BE_RESOURCE),
642 	FN("stream_context_set_default",   MAY_BE_FALSE | MAY_BE_RESOURCE),
643 	FN("stream_filter_prepend",        MAY_BE_FALSE | MAY_BE_RESOURCE),
644 	FN("stream_filter_append",         MAY_BE_FALSE | MAY_BE_RESOURCE),
645 	F0("stream_filter_remove",         MAY_BE_FALSE | MAY_BE_TRUE),
646 	F1("stream_socket_client",         MAY_BE_FALSE | MAY_BE_RESOURCE),
647 	F1("stream_socket_server",         MAY_BE_FALSE | MAY_BE_RESOURCE),
648 	F1("stream_socket_accept",         MAY_BE_FALSE | MAY_BE_RESOURCE),
649 	F1("stream_socket_get_name",       MAY_BE_FALSE | MAY_BE_STRING),
650 	F1("stream_socket_recvfrom",       MAY_BE_FALSE | MAY_BE_STRING),
651 	F0("stream_socket_sendto",         MAY_BE_FALSE | MAY_BE_LONG),
652 	F0("stream_socket_enable_crypto",  MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG),
653 #ifdef HAVE_SHUTDOWN
654 	F0("stream_socket_shutdown",       MAY_BE_FALSE | MAY_BE_TRUE),
655 #endif
656 #if HAVE_SOCKETPAIR
657 	F1("stream_socket_pair",           MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_RESOURCE),
658 #endif
659 	F0("stream_copy_to_stream",        MAY_BE_FALSE | MAY_BE_LONG),
660 	F1("stream_get_contents",          MAY_BE_FALSE | MAY_BE_STRING),
661 	F0("stream_supports_lock",         MAY_BE_FALSE | MAY_BE_TRUE),
662 	F1("fgetcsv",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
663 	F0("fputcsv",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
664 	F0("flock",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
665 	F1("get_meta_tags",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
666 	F0("stream_set_read_buffer",       MAY_BE_FALSE | MAY_BE_LONG),
667 	F0("stream_set_write_buffer",      MAY_BE_FALSE | MAY_BE_LONG),
668 	F0("set_file_buffer",              MAY_BE_FALSE | MAY_BE_LONG),
669 	F0("stream_set_chunk_size",        MAY_BE_FALSE | MAY_BE_LONG),
670 	F0("set_socket_blocking",          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
671 	F0("stream_set_blocking",          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
672 	F0("socket_set_blocking",          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
673 	F1("stream_get_meta_data",         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
674 	F1("stream_get_line",              MAY_BE_FALSE | MAY_BE_STRING),
675 	F0("stream_wrapper_register",      MAY_BE_FALSE | MAY_BE_TRUE),
676 	F0("stream_register_wrapper",      MAY_BE_FALSE | MAY_BE_TRUE),
677 	F0("stream_wrapper_unregister",    MAY_BE_FALSE | MAY_BE_TRUE),
678 	F0("stream_wrapper_restore",       MAY_BE_FALSE | MAY_BE_TRUE),
679 	F1("stream_get_wrappers",          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
680 	F1("stream_get_transports",        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
681 	F1("stream_resolve_include_path",  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
682 	F0("stream_is_local",              MAY_BE_FALSE | MAY_BE_TRUE),
683 	F1("get_headers",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
684 #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
685 	F0("stream_set_timeout",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
686 	F0("socket_set_timeout",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
687 #endif
688 	F1("socket_get_status",            MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
689 #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
690 	F1("realpath",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
691 #endif
692 #ifdef HAVE_FNMATCH
693 	F0("fnmatch",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
694 #endif
695 	F1("fsockopen",                    MAY_BE_FALSE | MAY_BE_RESOURCE),
696 	F1("pfsockopen",                   MAY_BE_FALSE | MAY_BE_RESOURCE),
697 	F1("pack",                         MAY_BE_FALSE | MAY_BE_STRING),
698 	F1("unpack",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
699 	F1("get_browser",                  MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
700 	F1("crypt",                        MAY_BE_NULL | MAY_BE_STRING),
701 	FN("opendir",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
702 	F0("closedir",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
703 	F0("chdir",                        MAY_BE_FALSE | MAY_BE_TRUE),
704 #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
705 	F0("chroot",                       MAY_BE_FALSE | MAY_BE_TRUE),
706 #endif
707 	F1("getcwd",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
708 	F0("rewinddir",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
709 	F1("readdir",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
710 	F1("dir",                          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
711 	F1("scandir",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
712 #ifdef HAVE_GLOB
713 	F1("glob",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
714 #endif
715 	F0("fileatime",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
716 	F0("filectime",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
717 	F0("filegroup",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
718 	F0("fileinode",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
719 	F0("filemtime",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
720 	F0("fileowner",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
721 	F0("fileperms",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
722 	F0("filesize",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
723 	F1("filetype",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
724 	F0("file_exists",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
725 	F0("is_writable",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
726 	F0("is_writeable",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
727 	F0("is_readable",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
728 	F0("is_executable",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
729 	F0("is_file",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
730 	F0("is_dir",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
731 	F0("is_link",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
732 	F1("stat",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
733 	F1("lstat",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
734 #ifndef NETWARE
735 	F0("chown",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
736 	F0("chgrp",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
737 #endif
738 #if HAVE_LCHOWN
739 	F0("lchown",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
740 #endif
741 #if HAVE_LCHOWN
742 	F0("lchgrp",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
743 #endif
744 	F0("chmod",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
745 #if HAVE_UTIME
746 	F0("touch",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
747 #endif
748 	F0("clearstatcache",               MAY_BE_NULL),
749 	F0("disk_total_space",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
750 	F0("disk_free_space",              MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
751 	F0("diskfreespace",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_DOUBLE),
752 	F0("realpath_cache_size",          MAY_BE_NULL | MAY_BE_LONG),
753 	F1("realpath_cache_get",           MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
754 	F0("mail",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
755 	F0("ezmlm_hash",                   MAY_BE_NULL | MAY_BE_LONG),
756 #ifdef HAVE_SYSLOG_H
757 	F0("openlog",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
758 	F0("syslog",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
759 	F0("closelog",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
760 #endif
761 	F0("lcg_value",                    MAY_BE_DOUBLE),
762 	F1("metaphone",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
763 	F0("ob_start",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
764 	F0("ob_flush",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
765 	F0("ob_clean",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
766 	F0("ob_end_flush",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
767 	F0("ob_end_clean",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
768 	F1("ob_get_flush",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
769 	F1("ob_get_clean",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
770 	F0("ob_get_length",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
771 	F0("ob_get_level",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
772 	F1("ob_get_status",                MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
773 	FN("ob_get_contents",              MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
774 	F0("ob_implicit_flush",            MAY_BE_NULL),
775 	F1("ob_list_handlers",             MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
776 	F0("ksort",                        MAY_BE_FALSE | MAY_BE_TRUE),
777 	F0("krsort",                       MAY_BE_FALSE | MAY_BE_TRUE),
778 	F0("natsort",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
779 	F0("natcasesort",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
780 	F0("asort",                        MAY_BE_FALSE | MAY_BE_TRUE),
781 	F0("arsort",                       MAY_BE_FALSE | MAY_BE_TRUE),
782 	F0("sort",                         MAY_BE_FALSE | MAY_BE_TRUE),
783 	F0("rsort",                        MAY_BE_FALSE | MAY_BE_TRUE),
784 	F0("usort",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
785 	F0("uasort",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
786 	F0("uksort",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
787 	F0("shuffle",                      MAY_BE_FALSE | MAY_BE_TRUE),
788 	F0("array_walk",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
789 	F0("array_walk_recursive",         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
790 	F0("count",                        MAY_BE_NULL | MAY_BE_LONG),
791 	FN("end",                          UNKNOWN_INFO),
792 	FN("prev",                         UNKNOWN_INFO),
793 	FN("next",                         UNKNOWN_INFO),
794 	FN("reset",                        UNKNOWN_INFO),
795 	FN("current",                      UNKNOWN_INFO),
796 	FN("key",                          MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING),
797 	FN("min",                          UNKNOWN_INFO),
798 	FN("max",                          UNKNOWN_INFO),
799 	F0("in_array",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
800 	FN("array_search",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING),
801 	F0("extract",                      MAY_BE_NULL | MAY_BE_LONG),
802 	F1("compact",                      MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
803 	F1("array_fill",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
804 	F1("array_fill_keys",              MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
805 	FC("range",                        zend_range_info),
806 	F0("array_multisort",              MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
807 	F0("array_push",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
808 	FN("array_pop",                    UNKNOWN_INFO),
809 	FN("array_shift",                  UNKNOWN_INFO),
810 	F0("array_unshift",                MAY_BE_NULL | MAY_BE_LONG),
811 	F1("array_splice",                 MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
812 	F1("array_slice",                  MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
813 	F1("array_merge",                  MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
814 	F1("array_merge_recursive",        MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
815 	F1("array_replace",                MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
816 	F1("array_replace_recursive",      MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
817 	F1("array_keys",                   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
818 	F1("array_values",                 MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
819 	F1("array_count_values",           MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG),
820 	F1("array_column",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
821 	F1("array_reverse",                MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
822 	F1("array_reduce",                 UNKNOWN_INFO),
823 	FN("array_pad",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
824 	F1("array_flip",                   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
825 	F1("array_change_key_case",        MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
826 	F1("array_rand",                   UNKNOWN_INFO),
827 	FN("array_unique",                 MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
828 	F1("array_intersect",              MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
829 	F1("array_intersect_key",          MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
830 	F1("array_intersect_ukey",         MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
831 	F1("array_uintersect",             MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
832 	F1("array_intersect_assoc",        MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
833 	F1("array_uintersect_assoc",       MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
834 	F1("array_intersect_uassoc",       MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
835 	F1("array_uintersect_uassoc",      MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
836 	FN("array_diff",                   MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
837 	F1("array_diff_key",               MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
838 	F1("array_diff_ukey",              MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
839 	F1("array_udiff",                  MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
840 	F1("array_diff_assoc",             MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
841 	F1("array_udiff_assoc",            MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
842 	F1("array_diff_uassoc",            MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
843 	F1("array_udiff_uassoc",           MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
844 	F0("array_sum",                    MAY_BE_NULL | MAY_BE_LONG | MAY_BE_DOUBLE),
845 	F0("array_product",                MAY_BE_NULL | MAY_BE_LONG | MAY_BE_DOUBLE),
846 	F1("array_filter",                 MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
847 	FN("array_map",                    MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
848 	F1("array_chunk",                  MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
849 	F1("array_combine",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
850 	F0("array_key_exists",             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
851 	F1("pos",                          UNKNOWN_INFO),
852 	F0("sizeof",                       MAY_BE_NULL | MAY_BE_LONG),
853 	F0("key_exists",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
854 	F0("assert",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
855 	F1("assert_options",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_OBJECT | MAY_BE_OBJECT),
856 	F0("version_compare",              MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG),
857 #if HAVE_FTOK
858 	F0("ftok",                         MAY_BE_NULL | MAY_BE_LONG),
859 #endif
860 	F1("str_rot13",                    MAY_BE_NULL | MAY_BE_STRING),
861 	F1("stream_get_filters",           MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
862 	F0("stream_filter_register",       MAY_BE_FALSE | MAY_BE_TRUE),
863 	F1("stream_bucket_make_writeable", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
864 	F1("stream_bucket_prepend",        MAY_BE_FALSE | MAY_BE_OBJECT),
865 	F1("stream_bucket_append",         MAY_BE_FALSE | MAY_BE_OBJECT),
866 	F1("stream_bucket_new",            MAY_BE_FALSE | MAY_BE_OBJECT),
867 	F0("output_add_rewrite_var",       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
868 	F0("output_reset_rewrite_vars",    MAY_BE_FALSE),
869 	F1("sys_get_temp_dir",             MAY_BE_NULL | MAY_BE_STRING),
870 
871 	/* ext/date */
872 	F0("strtotime",                             MAY_BE_FALSE | MAY_BE_LONG),
873 	F1("date",                                  MAY_BE_FALSE | MAY_BE_STRING),
874 	F0("idate",                                 MAY_BE_FALSE | MAY_BE_LONG),
875 	F1("gmdate",                                MAY_BE_FALSE | MAY_BE_STRING),
876 	F0("mktime",                                MAY_BE_FALSE | MAY_BE_LONG),
877 	F0("gmmktime",                              MAY_BE_FALSE | MAY_BE_LONG),
878 	F0("checkdate",                             MAY_BE_FALSE | MAY_BE_TRUE),
879 #ifdef HAVE_STRFTIME
880 	F1("strftime",                              MAY_BE_FALSE | MAY_BE_STRING),
881 	F1("gmstrftime",                            MAY_BE_FALSE | MAY_BE_STRING),
882 #endif
883 	F0("time",                                  MAY_BE_LONG),
884 	F1("localtime",                             MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG),
885 	F1("getdate",                               MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
886 	F1("date_create",                           MAY_BE_FALSE | MAY_BE_OBJECT),
887 	F1("date_create_immutable",                 MAY_BE_FALSE | MAY_BE_OBJECT),
888 	F1("date_create_from_format",               MAY_BE_FALSE | MAY_BE_OBJECT),
889 	F1("date_create_immutable_from_format",     MAY_BE_FALSE | MAY_BE_OBJECT),
890 	F1("date_parse",                            MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
891 	F1("date_parse_from_format",                MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
892 	F1("date_get_last_errors",                  MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_ARRAY),
893 	F1("date_format",                           MAY_BE_FALSE | MAY_BE_STRING),
894 	FN("date_modify",                           MAY_BE_FALSE | MAY_BE_OBJECT),
895 	FN("date_add",                              MAY_BE_FALSE | MAY_BE_OBJECT),
896 	FN("date_sub",                              MAY_BE_FALSE | MAY_BE_OBJECT),
897 	F1("date_timezone_get",                     MAY_BE_FALSE | MAY_BE_OBJECT),
898 	FN("date_timezone_set",                     MAY_BE_FALSE | MAY_BE_OBJECT),
899 	F0("date_offset_get",                       MAY_BE_FALSE | MAY_BE_LONG),
900 	F1("date_diff",                             MAY_BE_FALSE | MAY_BE_OBJECT),
901 	FN("date_time_set",                         MAY_BE_FALSE | MAY_BE_OBJECT),
902 	FN("date_date_set",                         MAY_BE_FALSE | MAY_BE_OBJECT),
903 	FN("date_isodate_set",                      MAY_BE_FALSE | MAY_BE_OBJECT),
904 	FN("date_timestamp_set",                    MAY_BE_FALSE | MAY_BE_OBJECT),
905 	F0("date_timestamp_get",                    MAY_BE_FALSE | MAY_BE_LONG),
906 	F1("timezone_open",                         MAY_BE_FALSE | MAY_BE_OBJECT),
907 	F1("timezone_name_get",                     MAY_BE_FALSE | MAY_BE_STRING),
908 	F1("timezone_name_from_abbr",               MAY_BE_FALSE | MAY_BE_STRING),
909 	F0("timezone_offset_get",                   MAY_BE_FALSE | MAY_BE_LONG),
910 	F1("timezone_transitions_get",              MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
911 	F1("timezone_location_get",                 MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_DOUBLE | MAY_BE_ARRAY_OF_STRING),
912 	F1("timezone_identifiers_list",             MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
913 	F1("timezone_abbreviations_list",           MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ARRAY),
914 	F1("timezone_version_get",                  MAY_BE_STRING),
915 	F1("date_interval_create_from_date_string", MAY_BE_FALSE | MAY_BE_OBJECT),
916 	F1("date_interval_format",                  MAY_BE_FALSE | MAY_BE_STRING),
917 	F0("date_default_timezone_set",             MAY_BE_FALSE | MAY_BE_TRUE),
918 	F1("date_default_timezone_get",             MAY_BE_STRING),
919 	F1("date_sunrise",                          MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING),
920 	F1("date_sunset",                           MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING),
921 	F1("date_sun_info",                         MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG),
922 
923 	/* ext/preg */
924 	F0("preg_match",				            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
925 	F0("preg_match_all",			            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
926 	FN("preg_replace",			                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
927 	FN("preg_replace_callback",	                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
928 	F1("preg_filter",				            MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
929 	F1("preg_split",				            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
930 	F1("preg_quote",				            MAY_BE_NULL | MAY_BE_STRING),
931 	F1("preg_grep",				                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
932 	F0("preg_last_error",			            MAY_BE_NULL | MAY_BE_LONG),
933 
934 	/* ext/ereg */
935 	F0("ereg",			                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
936 	F1("ereg_replace",	                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
937 	F0("eregi",			                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
938 	F1("eregi_replace",	                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
939 	F1("split",			                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
940 	F1("spliti",			                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
941 	F1("sql_regcase",		                    MAY_BE_NULL | MAY_BE_STRING),
942 
943 	/* ext/mysql */
944 	F1("mysql_connect",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
945 	F1("mysql_pconnect",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
946 	F0("mysql_close",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
947 	F0("mysql_select_db",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
948 	F0("mysql_create_db",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
949 	F0("mysql_drop_db",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
950 	F1("mysql_query",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE),
951 	F1("mysql_unbuffered_query",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE),
952 	F1("mysql_db_query",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE),
953 	F1("mysql_list_dbs",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
954 	F1("mysql_list_tables",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
955 	F1("mysql_list_fields",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
956 	F1("mysql_list_processes",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
957 	F1("mysql_error",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
958 	F0("mysql_errno",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
959 	F0("mysql_affected_rows",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
960 	F0("mysql_insert_id",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
961 	F1("mysql_result",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
962 	F0("mysql_num_rows",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
963 	F0("mysql_num_fields",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
964 	F1("mysql_fetch_row",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY),
965 	F1("mysql_fetch_array",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
966 	F1("mysql_fetch_assoc",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
967 	F1("mysql_fetch_object",					MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
968 	F0("mysql_data_seek",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
969 	F1("mysql_fetch_lengths",					MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
970 	F1("mysql_fetch_field",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
971 	F0("mysql_field_seek",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
972 	F0("mysql_free_result",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
973 	F1("mysql_field_name",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
974 	F1("mysql_field_table",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
975 	F0("mysql_field_len",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
976 	F1("mysql_field_type",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
977 	F1("mysql_field_flags",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
978 	F1("mysql_escape_string",					MAY_BE_NULL | MAY_BE_STRING),
979 	F1("mysql_real_escape_string",				MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
980 	F1("mysql_stat",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
981 	F0("mysql_thread_id",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
982 	F1("mysql_client_encoding",					MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
983 	F0("mysql_ping",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
984 	F1("mysql_get_client_info",					MAY_BE_NULL | MAY_BE_STRING),
985 	F1("mysql_get_host_info",					MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
986 	F0("mysql_get_proto_info",					MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
987 	F1("mysql_get_server_info",					MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
988 	F1("mysql_info",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
989 	F0("mysql_set_charset",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
990 	F1("mysql",									MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
991 	F1("mysql_fieldname",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
992 	F1("mysql_fieldtable",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
993 	F0("mysql_fieldlen",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
994 	F1("mysql_fieldtype",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
995 	F1("mysql_fieldflags",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
996 	F0("mysql_selectdb",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
997 	F0("mysql_createdb",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
998 	F0("mysql_dropdb",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
999 	F0("mysql_freeresult",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1000 	F0("mysql_numfields",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1001 	F0("mysql_numrows",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1002 	F1("mysql_listdbs",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
1003 	F1("mysql_listtables",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
1004 	F1("mysql_listfields",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
1005 	F1("mysql_db_name",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1006 	F1("mysql_dbname",							MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1007 	F1("mysql_tablename",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1008 	F1("mysql_table_name",						MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1009 
1010 	/* ext/curl */
1011 	F1("curl_init",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
1012 	F1("curl_copy_handle",                      MAY_BE_NULL | MAY_BE_RESOURCE),
1013 	F1("curl_version",                          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
1014 	F0("curl_setopt",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1015 	F0("curl_setopt_array",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1016 	FN("curl_exec",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1017 	F1("curl_getinfo",                          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
1018 	F1("curl_error",                            MAY_BE_NULL | MAY_BE_STRING),
1019 	F0("curl_errno",                            MAY_BE_NULL | MAY_BE_LONG),
1020 	F0("curl_close",                            MAY_BE_NULL),
1021 	F1("curl_strerror",                         MAY_BE_NULL | MAY_BE_STRING),
1022 	F1("curl_multi_strerror",                   MAY_BE_NULL | MAY_BE_STRING),
1023 	F0("curl_reset",                            MAY_BE_NULL),
1024 	F1("curl_escape",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1025 	F1("curl_unescape",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1026 	F0("curl_pause",                            MAY_BE_NULL | MAY_BE_LONG),
1027 	F1("curl_multi_init",                       MAY_BE_NULL | MAY_BE_RESOURCE),
1028 	F0("curl_multi_add_handle",                 MAY_BE_NULL | MAY_BE_LONG),
1029 	F0("curl_multi_remove_handle",              MAY_BE_NULL | MAY_BE_LONG),
1030 	F0("curl_multi_select",                     MAY_BE_NULL | MAY_BE_LONG),
1031 	F0("curl_multi_exec",                       MAY_BE_NULL | MAY_BE_LONG),
1032 	FN("curl_multi_getcontent",                 MAY_BE_NULL | MAY_BE_STRING),
1033 	F1("curl_multi_info_read",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_RESOURCE),
1034 	F0("curl_multi_close",                      MAY_BE_NULL),
1035 	F0("curl_multi_setopt",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1036 	F1("curl_share_init",                       MAY_BE_NULL | MAY_BE_RESOURCE),
1037 	F0("curl_share_close",                      MAY_BE_NULL),
1038 	F0("curl_share_setopt",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1039 	F1("curl_file_create",                      MAY_BE_OBJECT),
1040 
1041 	/* ext/mbstring */
1042 	F1("mb_convert_case",                       MAY_BE_FALSE | MAY_BE_STRING),
1043 	F1("mb_strtoupper",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1044 	F1("mb_strtolower",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1045 	F1("mb_language",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
1046 	F1("mb_internal_encoding",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
1047 	F1("mb_http_input",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1048 	F1("mb_http_output",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
1049 	F1("mb_detect_order",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
1050 	F1("mb_substitute_character",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG | MAY_BE_STRING),
1051 	F0("mb_parse_str",                          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1052 	F1("mb_output_handler",                     MAY_BE_NULL | MAY_BE_STRING),
1053 	F1("mb_preferred_mime_name",                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1054 	F0("mb_strlen",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1055 	F0("mb_strpos",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1056 	F0("mb_strrpos",                            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1057 	F0("mb_stripos",                            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1058 	F0("mb_strripos",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1059 	F1("mb_strstr",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1060 	F1("mb_strrchr",                            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1061 	F1("mb_stristr",                            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1062 	F1("mb_strrichr",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1063 	F0("mb_substr_count",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1064 	F1("mb_substr",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1065 	F1("mb_strcut",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1066 	F0("mb_strwidth",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1067 	F1("mb_strimwidth",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1068 	F1("mb_convert_encoding",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
1069 	F1("mb_detect_encoding",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1070 	F1("mb_list_encodings",                     MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
1071 	F1("mb_encoding_aliases",                   MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
1072 	F1("mb_convert_kana",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1073 	F1("mb_encode_mimeheader",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1074 	F1("mb_decode_mimeheader",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1075 	F1("mb_convert_variables",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1076 	F1("mb_encode_numericentity",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1077 	F1("mb_decode_numericentity",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1078 	F0("mb_send_mail",                          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1079 	F1("mb_get_info",                           MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
1080 	F0("mb_check_encoding",                     MAY_BE_FALSE | MAY_BE_TRUE),
1081 
1082 	F1("mb_regex_encoding",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
1083 	F1("mb_regex_set_options",                  MAY_BE_FALSE | MAY_BE_STRING),
1084 	F0("mb_ereg",                               MAY_BE_FALSE | MAY_BE_LONG),
1085 	F0("mb_eregi",                              MAY_BE_FALSE | MAY_BE_LONG),
1086 	F1("mb_ereg_replace",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1087 	F1("mb_eregi_replace",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1088 	F1("mb_ereg_replace_callback",              MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1089 	F1("mb_split",                              MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
1090 	F0("mb_ereg_match",                         MAY_BE_FALSE | MAY_BE_TRUE),
1091 	F0("mb_ereg_search",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1092 	F1("mb_ereg_search_pos",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
1093 	F1("mb_ereg_search_regs",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING),
1094 	F0("mb_ereg_search_init",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1095 	F1("mb_ereg_search_getregs",                MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING),
1096 	F0("mb_ereg_search_getpos",                 MAY_BE_LONG),
1097 	F0("mb_ereg_search_setpos",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1098 
1099 	F0("mbregex_encoding",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1100 	F0("mbereg",                                MAY_BE_FALSE | MAY_BE_LONG),
1101 	F0("mberegi",                               MAY_BE_FALSE | MAY_BE_LONG),
1102 	F1("mbereg_replace",                        MAY_BE_FALSE | MAY_BE_STRING),
1103 	F1("mberegi_replace",                       MAY_BE_FALSE | MAY_BE_STRING),
1104 	F1("mbsplit",                               MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
1105 	F0("mbereg_match",                          MAY_BE_FALSE | MAY_BE_TRUE),
1106 	F0("mbereg_search",                         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1107 	F1("mbereg_search_pos",                     MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
1108 	F1("mbereg_search_regs",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING),
1109 	F0("mbereg_search_init",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1110 	F1("mbereg_search_getregs",                 MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_STRING),
1111 	F0("mbereg_search_getpos",                  MAY_BE_LONG),
1112 	F0("mbereg_search_setpos",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1113 
1114 	/* ext/iconv */
1115 	F1("iconv",                                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1116 	F1("iconv_get_encoding",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING),
1117 	F0("iconv_set_encoding",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1118 	F0("iconv_strlen",                          MAY_BE_FALSE | MAY_BE_LONG),
1119 	F1("iconv_substr",                          MAY_BE_FALSE | MAY_BE_STRING),
1120 	F0("iconv_strpos",                          MAY_BE_FALSE | MAY_BE_LONG),
1121 	F0("iconv_strrpos",                         MAY_BE_FALSE | MAY_BE_LONG),
1122 	F1("iconv_mime_encode",                     MAY_BE_FALSE | MAY_BE_STRING),
1123 	F1("iconv_mime_decode",                     MAY_BE_FALSE | MAY_BE_STRING),
1124 	F1("iconv_mime_decode_headers",             MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
1125 
1126 	/* ext/json */
1127 	F1("json_encode",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1128 	F1("json_decode",                           MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
1129 	F0("json_last_error",                       MAY_BE_NULL | MAY_BE_LONG),
1130 	F1("json_last_error_msg",                   MAY_BE_NULL | MAY_BE_STRING),
1131 
1132 	/* ext/xml */
1133 	FN("xml_parser_create",                     MAY_BE_FALSE | MAY_BE_RESOURCE),
1134 	FN("xml_parser_create_ns",                  MAY_BE_FALSE | MAY_BE_RESOURCE),
1135 	F0("xml_set_object",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1136 	F0("xml_set_element_handler",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1137 	F0("xml_set_character_data_handler",        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1138 	F0("xml_set_processing_instruction_handler",MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1139 	F0("xml_set_default_handler",               MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1140 	F0("xml_set_unparsed_entity_decl_handler",  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1141 	F0("xml_set_notation_decl_handler",         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1142 	F0("xml_set_external_entity_ref_handler",   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1143 	F0("xml_set_start_namespace_decl_handler",  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1144 	F0("xml_set_end_namespace_decl_handler",    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1145 	F0("xml_parse",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1146 	F0("xml_parse_into_struct",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1147 	F0("xml_get_error_code",                    MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1148 	F1("xml_error_string",                      MAY_BE_NULL | MAY_BE_STRING),
1149 	F0("xml_get_current_line_number",           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1150 	F0("xml_get_current_column_number",         MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1151 	F0("xml_get_current_byte_index",            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1152 	F0("xml_parser_free",                       MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1153 	F0("xml_parser_set_option",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1154 	F1("xml_parser_get_option",                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_STRING),
1155 	F1("utf8_encode",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1156 	F1("utf8_decode",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1157 
1158 	/* ext/zlib */
1159 	F0("readgzfile",                            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1160 	F0("gzrewind",                              MAY_BE_FALSE | MAY_BE_TRUE),
1161 	F0("gzclose",                               MAY_BE_FALSE | MAY_BE_TRUE),
1162 	F0("gzeof",                                 MAY_BE_FALSE | MAY_BE_TRUE),
1163 	F1("gzgetc",                                MAY_BE_FALSE | MAY_BE_STRING),
1164 	F1("gzgets",                                MAY_BE_FALSE | MAY_BE_STRING),
1165 	F1("gzgetss",                               MAY_BE_FALSE | MAY_BE_STRING),
1166 	F1("gzread",                                MAY_BE_FALSE | MAY_BE_STRING),
1167 	F1("gzopen",                                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
1168 	F0("gzpassthru",                            MAY_BE_FALSE | MAY_BE_LONG),
1169 	F0("gzseek",                                MAY_BE_FALSE | MAY_BE_LONG),
1170 	F0("gztell",                                MAY_BE_FALSE | MAY_BE_LONG),
1171 	F0("gzwrite",                               MAY_BE_FALSE | MAY_BE_LONG),
1172 	F0("gzputs",                                MAY_BE_FALSE | MAY_BE_LONG),
1173 	F1("gzfile",                                MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
1174 	F1("gzcompress",                            MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1175 	F1("gzuncompress",                          MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1176 	F1("gzdeflate",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1177 	F1("gzinflate",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1178 	F1("gzencode",                              MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1179 	F1("gzdecode",                              MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1180 	F1("zlib_encode",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1181 	F1("zlib_decode",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1182 	F1("zlib_get_coding_type",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1183 	F1("ob_gzhandler",                          MAY_BE_FALSE | MAY_BE_STRING),
1184 
1185 	/* ext/hash */
1186 	F1("hash",                                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1187 	F1("hash_file",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1188 	F1("hash_hmac",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1189 	F1("hash_hmac_file",                        MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1190 	F1("hash_init",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
1191 	F0("hash_update",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1192 	F0("hash_update_stream",                    MAY_BE_NULL | MAY_BE_LONG),
1193 	F0("hash_update_file",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
1194 	F1("hash_final",                            MAY_BE_NULL | MAY_BE_STRING),
1195 	F1("hash_copy",                             MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
1196 	F1("hash_algos",                            MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
1197 	F1("hash_pbkdf2",                           MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1198 	F1("mhash_keygen_s2k",                      MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1199 	F0("mhash_get_block_size",                  MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
1200 	F1("mhash_get_hash_name",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1201 	F0("mhash_count",                           MAY_BE_NULL | MAY_BE_LONG),
1202 	F1("mhash",                                 MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1203 };
1204 
1205 static HashTable func_info;
1206 int zend_func_info_rid = -1;
1207 
zend_get_func_info(const zend_call_info * call_info,const zend_ssa * ssa)1208 uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa)
1209 {
1210 	uint32_t ret = 0;
1211 
1212 	if (call_info->callee_func->type == ZEND_INTERNAL_FUNCTION) {
1213 		func_info_t *info;
1214 
1215 		if ((info = zend_hash_find_ptr(&func_info, Z_STR_P(CRT_CONSTANT_EX(call_info->caller_op_array, call_info->caller_init_opline->op2, ssa->rt_constants)))) != NULL) {
1216 			if (UNEXPECTED(zend_optimizer_is_disabled_func(info->name, info->name_len))) {
1217 				ret = MAY_BE_NULL;
1218 			} else if (info->info_func) {
1219 				ret = info->info_func(call_info, ssa);
1220 			} else {
1221 				ret = info->info;
1222 			}
1223 #if 0
1224 		} else {
1225 			fprintf(stderr, "Unknown internal function '%s'\n", func->common.function_name);
1226 #endif
1227 		}
1228 	} else {
1229 		// FIXME: the order of functions matters!!!
1230 		zend_func_info *info = ZEND_FUNC_INFO((zend_op_array*)call_info->callee_func);
1231 		if (info) {
1232 			ret = info->return_info.type;
1233 		}
1234 	}
1235 	if (!ret) {
1236 		ret = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
1237 		if (call_info->callee_func->type == ZEND_INTERNAL_FUNCTION) {
1238 			ret |= FUNC_MAY_WARN;
1239 		}
1240 		if (call_info->callee_func->common.fn_flags & ZEND_ACC_GENERATOR) {
1241 			ret = MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_OBJECT;
1242 		} else  if (call_info->callee_func->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
1243 			ret |= MAY_BE_REF;
1244 		} else {
1245 			ret |= MAY_BE_RC1 | MAY_BE_RCN;
1246 		}
1247 	}
1248 	return ret;
1249 }
1250 
zend_func_info_startup(void)1251 int zend_func_info_startup(void)
1252 {
1253 	zend_extension dummy;
1254 	size_t i;
1255 
1256 	if (zend_func_info_rid == -1) {
1257 		zend_func_info_rid = zend_get_resource_handle(&dummy);
1258 		if (zend_func_info_rid < 0) {
1259 			return FAILURE;
1260 		}
1261 
1262 		zend_hash_init(&func_info, sizeof(func_infos)/sizeof(func_info_t), NULL, NULL, 1);
1263 		for (i = 0; i < sizeof(func_infos)/sizeof(func_info_t); i++) {
1264 			if (zend_hash_str_add_ptr(&func_info, func_infos[i].name, func_infos[i].name_len, (void**)&func_infos[i]) == NULL) {
1265 				fprintf(stderr, "ERROR: Duplicate function info for \"%s\"\n", func_infos[i].name);
1266 			}
1267 		}
1268 	}
1269 
1270 	return SUCCESS;
1271 }
1272 
zend_func_info_shutdown(void)1273 int zend_func_info_shutdown(void)
1274 {
1275 	if (zend_func_info_rid != -1) {
1276 		zend_hash_destroy(&func_info);
1277 		zend_func_info_rid = -1;
1278 	}
1279 	return SUCCESS;
1280 }
1281 
1282 /*
1283  * Local variables:
1284  * tab-width: 4
1285  * c-basic-offset: 4
1286  * indent-tabs-mode: t
1287  * End:
1288  */
1289