Skip to content

Commit 0dbc24c

Browse files
TysonAndrenikic
authored andcommitted
Fix other incorrect opcache types
Closes GH-4959.
1 parent 5624d2e commit 0dbc24c

File tree

1 file changed

+42
-41
lines changed

1 file changed

+42
-41
lines changed

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ static const func_info_t func_infos[] = {
119119
FN("constant", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_STRING | MAY_BE_RESOURCE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
120120
F1("bin2hex", MAY_BE_STRING),
121121
F1("hex2bin", MAY_BE_FALSE | MAY_BE_STRING),
122-
F0("sleep", MAY_BE_FALSE | MAY_BE_LONG),
123-
F0("usleep", MAY_BE_NULL | MAY_BE_FALSE),
124122
#if HAVE_NANOSLEEP
125123
F1("time_nanosleep", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
126124
F0("time_sleep_until", MAY_BE_FALSE | MAY_BE_TRUE),
@@ -129,7 +127,7 @@ static const func_info_t func_infos[] = {
129127
F1("strptime", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING),
130128
#endif
131129
F0("flush", MAY_BE_NULL),
132-
F1("wordwrap", MAY_BE_FALSE | MAY_BE_STRING),
130+
F1("wordwrap", MAY_BE_STRING),
133131
F1("htmlspecialchars", MAY_BE_STRING),
134132
F1("htmlentities", MAY_BE_STRING),
135133
FN("html_entity_decode", MAY_BE_FALSE | MAY_BE_STRING),
@@ -175,8 +173,8 @@ static const func_info_t func_infos[] = {
175173
F1("stristr", MAY_BE_FALSE | MAY_BE_STRING),
176174
F1("strrchr", MAY_BE_FALSE | MAY_BE_STRING),
177175
F1("str_shuffle", MAY_BE_STRING),
178-
F1("str_word_count", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
179-
F1("str_split", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
176+
F1("str_word_count", MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
177+
F1("str_split", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
180178
F1("strpbrk", MAY_BE_FALSE | MAY_BE_STRING),
181179
F0("substr_compare", MAY_BE_FALSE | MAY_BE_LONG),
182180
#ifdef HAVE_STRFMON
@@ -188,14 +186,14 @@ static const func_info_t func_infos[] = {
188186
FN("ucfirst", MAY_BE_STRING),
189187
FN("lcfirst", MAY_BE_STRING),
190188
F1("ucwords", MAY_BE_STRING),
191-
FN("strtr", MAY_BE_FALSE | MAY_BE_STRING),
189+
FN("strtr", MAY_BE_STRING),
192190
FN("addslashes", MAY_BE_STRING),
193191
F1("addcslashes", MAY_BE_STRING),
194192
FN("rtrim", MAY_BE_STRING),
195193
FN("chop", MAY_BE_STRING),
196194
FN("str_replace", 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),
197195
FN("str_ireplace", 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),
198-
F1("str_repeat", MAY_BE_NULL | MAY_BE_STRING),
196+
F1("str_repeat", MAY_BE_STRING),
199197
F1("count_chars", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG),
200198
F1("chunk_split", MAY_BE_STRING),
201199
FN("trim", MAY_BE_STRING),
@@ -212,8 +210,8 @@ static const func_info_t func_infos[] = {
212210
F1("soundex", MAY_BE_FALSE | MAY_BE_STRING),
213211
F0("levenshtein", MAY_BE_LONG),
214212
F1("chr", MAY_BE_STRING),
215-
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),
216-
FN("str_pad", MAY_BE_NULL | MAY_BE_STRING),
213+
F1("str_getcsv", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_NULL | MAY_BE_ARRAY_OF_STRING),
214+
FN("str_pad", MAY_BE_STRING),
217215
F1("strchr", MAY_BE_FALSE | MAY_BE_STRING),
218216
F1("sprintf", MAY_BE_FALSE | MAY_BE_STRING),
219217
F0("printf", MAY_BE_FALSE | MAY_BE_LONG),
@@ -244,19 +242,15 @@ static const func_info_t func_infos[] = {
244242
F1("shell_exec", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
245243
#ifdef PHP_CAN_SUPPORT_PROC_OPEN
246244
F1("proc_open", MAY_BE_FALSE | MAY_BE_RESOURCE),
247-
F0("proc_close", MAY_BE_FALSE | MAY_BE_LONG),
248245
F0("proc_terminate", MAY_BE_FALSE | MAY_BE_TRUE),
249-
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),
246+
F1("proc_get_status", 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),
250247
#endif
251248
#ifdef HAVE_NICE
252249
F0("proc_nice", MAY_BE_FALSE | MAY_BE_TRUE),
253250
#endif
254-
F0("rand", MAY_BE_NULL | MAY_BE_LONG),
255251
F1("random_bytes", MAY_BE_STRING),
256252
F1("random_int", MAY_BE_LONG),
257253
F0("srand", MAY_BE_NULL),
258-
F0("getrandmax", MAY_BE_NULL | MAY_BE_LONG),
259-
F0("mt_rand", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
260254
F0("mt_srand", MAY_BE_NULL),
261255
F0("mt_getrandmax", MAY_BE_LONG),
262256
#if HAVE_GETSERVBYNAME
@@ -286,7 +280,6 @@ static const func_info_t func_infos[] = {
286280
F0("abs", MAY_BE_LONG | MAY_BE_DOUBLE),
287281
F0("ceil", MAY_BE_DOUBLE),
288282
F0("floor", MAY_BE_DOUBLE),
289-
F0("round", MAY_BE_FALSE | MAY_BE_DOUBLE),
290283
F0("expm1", MAY_BE_DOUBLE),
291284
F0("log1p", MAY_BE_DOUBLE),
292285
F1("pow", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_OBJECT),
@@ -356,7 +349,6 @@ static const func_info_t func_infos[] = {
356349
F0("memory_get_usage", MAY_BE_FALSE | MAY_BE_LONG),
357350
F0("memory_get_peak_usage", MAY_BE_FALSE | MAY_BE_LONG),
358351
F0("register_shutdown_function", MAY_BE_NULL | MAY_BE_FALSE),
359-
F0("register_tick_function", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
360352
F0("unregister_tick_function", MAY_BE_NULL),
361353
F1("highlight_file", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
362354
F1("show_source", MAY_BE_FALSE | MAY_BE_STRING),
@@ -365,13 +357,13 @@ static const func_info_t func_infos[] = {
365357
FN("ini_get", MAY_BE_FALSE | MAY_BE_STRING),
366358
F1("ini_get_all", 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),
367359
FN("ini_set", MAY_BE_FALSE | MAY_BE_STRING),
368-
F1("ini_alter", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
360+
F1("ini_alter", MAY_BE_FALSE | MAY_BE_STRING),
369361
F0("ini_restore", MAY_BE_NULL),
370362
F1("get_include_path", MAY_BE_FALSE | MAY_BE_STRING),
371363
F1("set_include_path", MAY_BE_FALSE | MAY_BE_STRING),
372364
F0("restore_include_path", MAY_BE_NULL),
373365
F1("headers_list", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
374-
F0("http_response_code", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
366+
F0("http_response_code", MAY_BE_FALSE | MAY_BE_LONG),
375367
F0("connection_aborted", MAY_BE_LONG),
376368
F0("connection_status", MAY_BE_LONG),
377369
F0("ignore_user_abort", MAY_BE_LONG),
@@ -498,7 +490,6 @@ static const func_info_t func_infos[] = {
498490
F0("chroot", MAY_BE_FALSE | MAY_BE_TRUE),
499491
#endif
500492
F1("getcwd", MAY_BE_FALSE | MAY_BE_STRING),
501-
F0("rewinddir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
502493
F1("readdir", MAY_BE_FALSE | MAY_BE_STRING),
503494
F1("dir", MAY_BE_FALSE | MAY_BE_OBJECT),
504495
F1("scandir", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
@@ -538,6 +529,7 @@ static const func_info_t func_infos[] = {
538529
F0("mail", MAY_BE_FALSE | MAY_BE_TRUE),
539530
F0("ezmlm_hash", MAY_BE_LONG),
540531
#ifdef HAVE_SYSLOG_H
532+
F0("syslog", MAY_BE_TRUE),
541533
F0("closelog", MAY_BE_TRUE),
542534
#endif
543535
F1("metaphone", MAY_BE_FALSE | MAY_BE_STRING),
@@ -547,6 +539,17 @@ static const func_info_t func_infos[] = {
547539
F1("ob_get_status", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
548540
FN("ob_get_contents", MAY_BE_FALSE | MAY_BE_STRING),
549541
F1("ob_list_handlers", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
542+
F0("array_walk", MAY_BE_TRUE),
543+
F0("array_walk_recursive", MAY_BE_TRUE),
544+
F0("arsort", MAY_BE_TRUE),
545+
F0("asort", MAY_BE_TRUE),
546+
F0("krsort", MAY_BE_TRUE),
547+
F0("ksort", MAY_BE_TRUE),
548+
F0("shuffle", MAY_BE_TRUE),
549+
F0("sort", MAY_BE_TRUE),
550+
F0("usort", MAY_BE_TRUE),
551+
F0("uasort", MAY_BE_TRUE),
552+
F0("uksort", MAY_BE_TRUE),
550553
FN("end", UNKNOWN_INFO),
551554
FN("prev", UNKNOWN_INFO),
552555
FN("next", UNKNOWN_INFO),
@@ -662,14 +665,14 @@ static const func_info_t func_infos[] = {
662665
F1("date_sun_info", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_FALSE | MAY_BE_ARRAY_OF_TRUE | MAY_BE_ARRAY_OF_LONG),
663666

664667
/* ext/preg */
665-
F0("preg_match", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
668+
F0("preg_match", MAY_BE_FALSE | MAY_BE_LONG),
666669
F0("preg_match_all", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
667-
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),
668-
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),
669-
F1("preg_filter", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
670-
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),
670+
FN("preg_replace", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
671+
FN("preg_replace_callback", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
672+
F1("preg_filter", MAY_BE_NULL | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING),
673+
F1("preg_split", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
671674
FN("preg_quote", MAY_BE_STRING),
672-
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),
675+
F1("preg_grep", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
673676

674677
/* ext/mysqli */
675678
F1("mysqli_connect", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
@@ -775,19 +778,17 @@ static const func_info_t func_infos[] = {
775778
/* ext/curl */
776779
F1("curl_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
777780
F1("curl_copy_handle", MAY_BE_NULL | MAY_BE_RESOURCE),
778-
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),
779-
FN("curl_exec", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
781+
F1("curl_version", 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),
782+
FN("curl_exec", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_STRING),
780783
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),
781784
F1("curl_error", MAY_BE_STRING),
782785
F1("curl_strerror", MAY_BE_NULL | MAY_BE_STRING),
783786
F1("curl_multi_strerror", MAY_BE_NULL | MAY_BE_STRING),
784-
F1("curl_escape", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
785-
F1("curl_unescape", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
787+
F1("curl_escape", MAY_BE_FALSE | MAY_BE_STRING),
788+
F1("curl_unescape", MAY_BE_FALSE | MAY_BE_STRING),
786789
F1("curl_multi_init", MAY_BE_RESOURCE),
787790
FN("curl_multi_getcontent", MAY_BE_NULL | MAY_BE_STRING),
788-
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),
789-
F0("curl_multi_close", MAY_BE_NULL | MAY_BE_FALSE),
790-
F0("curl_multi_setopt", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
791+
F1("curl_multi_info_read", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_RESOURCE),
791792
F1("curl_share_init", MAY_BE_RESOURCE),
792793
F1("curl_file_create", MAY_BE_OBJECT),
793794

@@ -882,13 +883,13 @@ static const func_info_t func_infos[] = {
882883
F0("gztell", MAY_BE_FALSE | MAY_BE_LONG),
883884
F0("gzwrite", MAY_BE_FALSE | MAY_BE_LONG),
884885
F0("gzputs", MAY_BE_FALSE | MAY_BE_LONG),
885-
F1("gzfile", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
886-
F1("gzcompress", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
887-
F1("gzuncompress", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
888-
F1("gzdeflate", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
889-
F1("gzinflate", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
890-
F1("gzencode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
891-
F1("gzdecode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
886+
F1("gzfile", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
887+
F1("gzcompress", MAY_BE_FALSE | MAY_BE_STRING),
888+
F1("gzuncompress", MAY_BE_FALSE | MAY_BE_STRING),
889+
F1("gzdeflate", MAY_BE_FALSE | MAY_BE_STRING),
890+
F1("gzinflate", MAY_BE_FALSE | MAY_BE_STRING),
891+
F1("gzencode", MAY_BE_FALSE | MAY_BE_STRING),
892+
F1("gzdecode", MAY_BE_FALSE | MAY_BE_STRING),
892893
F1("zlib_encode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
893894
F1("zlib_decode", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
894895
F1("zlib_get_coding_type", MAY_BE_FALSE | MAY_BE_STRING),
@@ -1134,8 +1135,8 @@ static const func_info_t func_infos[] = {
11341135

11351136
/* ext/fileinfo */
11361137
F1("finfo_open", MAY_BE_FALSE | MAY_BE_RESOURCE),
1137-
F1("finfo_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1138-
F1("finfo_buffer", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
1138+
F1("finfo_file", MAY_BE_FALSE | MAY_BE_STRING),
1139+
F1("finfo_buffer", MAY_BE_FALSE | MAY_BE_STRING),
11391140
F1("mime_content_type", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
11401141

11411142
/* ext/gd */

0 commit comments

Comments
 (0)