diff options
author | Tyson Andre <tysonandre775@hotmail.com> | 2019-09-09 08:30:18 -0400 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-09-09 17:19:04 +0200 |
commit | 3e89e9a636bffb642190a823f023da8e9aeaeaa4 (patch) | |
tree | bddea416b127b0a6544aa1f2d7f67c6fe7068cdd | |
parent | 45e529d673779939d62cc159304cf70dc179cff4 (diff) | |
download | php-git-3e89e9a636bffb642190a823f023da8e9aeaeaa4.tar.gz |
Add opcache return type for random_int()
random_int() will throw for incorrect argument counts, types (e.g. float
that can't cast to int), or having min > max.
See ext/standard/random.c
-rw-r--r-- | ext/opcache/Optimizer/zend_func_info.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 551e8e3bd1..1553635d07 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -413,6 +413,7 @@ static const func_info_t func_infos[] = { #endif F0("rand", MAY_BE_NULL | MAY_BE_LONG), F1("random_bytes", MAY_BE_STRING), + F1("random_int", MAY_BE_LONG), 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), |