From 3e89e9a636bffb642190a823f023da8e9aeaeaa4 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Mon, 9 Sep 2019 08:30:18 -0400 Subject: [PATCH] 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 --- ext/opcache/Optimizer/zend_func_info.c | 1 + 1 file changed, 1 insertion(+) 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), -- 2.50.0