array_rand
symfony/var-dumper
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Pick one or more random keys out of an array
<?php array_rand
(array
$array
,
int $num
=
1
):
int
|
string
|array