Keep in mind that now srand is an alias for mt_srand, but they behaved differently before. This means you should not follow the documentation of srand, but the one of mt_srand, when using srand.
To reset the seed to a random value, `mt_srand(0)` (or `srand(0)`) doesn't work. It sets the seed to 0. To reset the seed to a random value you must use `mt_srand()` (or `srand()`).
<?php
$arr = [0, 1, 2, 3, 4];
srand(1); $keys = array_rand($arr, 2); srand(0); $keys = array_rand($arr, 2); srand(); $keys = array_rand($arr, 2); ?>