Skip to content

Commit 6833704

Browse files
committed
Record that sort() and others are always true in opcache.
If sort doesn't succeed, it will does and should throw an exception or an error. syslog() currently also always returns true if it returns. See ext/standard/array.c and ext/standard/syslog.c Related to a653240
1 parent b7241ad commit 6833704

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ static const func_info_t func_infos[] = {
539539
F0("mail", MAY_BE_FALSE | MAY_BE_TRUE),
540540
F0("ezmlm_hash", MAY_BE_LONG),
541541
#ifdef HAVE_SYSLOG_H
542+
F0("syslog", MAY_BE_TRUE),
542543
F0("closelog", MAY_BE_TRUE),
543544
#endif
544545
F1("metaphone", MAY_BE_FALSE | MAY_BE_STRING),
@@ -548,6 +549,14 @@ static const func_info_t func_infos[] = {
548549
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),
549550
FN("ob_get_contents", MAY_BE_FALSE | MAY_BE_STRING),
550551
F1("ob_list_handlers", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
552+
F0("array_walk", MAY_BE_TRUE),
553+
F0("array_walk_recursive", MAY_BE_TRUE),
554+
F0("arsort", MAY_BE_TRUE),
555+
F0("asort", MAY_BE_TRUE),
556+
F0("krsort", MAY_BE_TRUE),
557+
F0("ksort", MAY_BE_TRUE),
558+
F0("shuffle", MAY_BE_TRUE),
559+
F0("sort", MAY_BE_TRUE),
551560
FN("end", UNKNOWN_INFO),
552561
FN("prev", UNKNOWN_INFO),
553562
FN("next", UNKNOWN_INFO),

0 commit comments

Comments
 (0)