com php-src: Add missing opcache return info for ext/standard.: ext/opcache/Optimizer/zend_func_info.c
| From: | Nikita Popov | Date: | Tue, 03 Sep 2019 07:57:51 +0000 |
| Subject: | com php-src: Add missing opcache return info for ext/standard.: ext/opcache/Optimizer/zend_func_info.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108205@lists.php.net to get a copy of this message | ||
Commit: 4de8503c225ab9f6130d335b21e7646a0142ed5e
Author: Tyson Andre <tysonandre775@hotmail.com> Mon, 2 Sep 2019 22:14:11 -0400
Committer: Nikita Popov <nikita.ppv@gmail.com> Tue, 3 Sep 2019 09:57:51 +0200
Parents: 1a905bcb1effab8909138fff1c7ef38682ce3fea
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4de8503c225ab9f6130d335b21e7646a0142ed5e
Log:
Add missing opcache return info for ext/standard.
array_key_first/last returns null for invalid args,
wrong argument counts, and empty arrays.
random_bytes returns a string or throws.
Changed paths:
M ext/opcache/Optimizer/zend_func_info.c
Diff:
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c
index a06ac05..9cae087 100644
--- a/ext/opcache/Optimizer/zend_func_info.c
+++ b/ext/opcache/Optimizer/zend_func_info.c
@@ -412,6 +412,7 @@ static const func_info_t func_infos[] = {
F0("proc_nice", MAY_BE_FALSE | MAY_BE_TRUE),
#endif
F0("rand", MAY_BE_NULL | MAY_BE_LONG),
+ F1("random_bytes", MAY_BE_STRING),
F0("srand", MAY_BE_NULL),
F0("getrandmax", MAY_BE_NULL | MAY_BE_LONG),
F0("mt_rand", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
@@ -848,6 +849,8 @@ static const func_info_t func_infos[] = {
F1("array_chunk", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY |
MAY_BE_ARRAY_OF_REF | MAY_BE_ARRAY_OF_ANY),
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),
F0("array_key_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
+ FN("array_key_first", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING),
+ FN("array_key_last", MAY_BE_NULL | MAY_BE_LONG | MAY_BE_STRING),
F1("pos", UNKNOWN_INFO),
F0("sizeof", MAY_BE_NULL | MAY_BE_LONG),
F0("key_exists", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),