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
This commit is contained in:
Tyson Andre 2019-09-09 08:30:18 -04:00 committed by Nikita Popov
parent 45e529d673
commit 3e89e9a636

View File

@ -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),