mark rand_* functions as $mayDependOnGlobalScope

This commit is contained in:
Ivan Fedorov 2021-07-20 15:49:09 +02:00 committed by Ivan Fedorov
parent f63b5ffc1e
commit 4686e6e240
2 changed files with 3 additions and 0 deletions

View File

@ -927,6 +927,7 @@ function proc_nice(int $priority): bool {}
* @return int A pseudo random value between min
* (or 0) and max (or getrandmax, inclusive).
*/
#[Pure(true)]
function rand(int $min = 0, int $max): int {}
/**
@ -965,6 +966,7 @@ function getrandmax(): int {}
* @return int A random integer value between min (or 0)
* and max (or mt_getrandmax, inclusive)
*/
#[Pure(true)]
function mt_rand(int $min = 0, int $max): int {}
/**

View File

@ -222,6 +222,7 @@ function array_change_key_case(array $array, int $case): array {}
* of keys for the random entries. This is done so that you can pick
* random keys as well as values out of the array.
*/
#[Pure(true)]
function array_rand(array $array, int $num = 1): array|string|int {}
/**