run code in 150+ php & hhvm versions
Bugs & Features
<?php $items = array(); echo gettype(array_rand($items));
Output for 7.1.0RC3 - 7.1.0RC4
Warning: array_rand(): Array is empty in /in/XJPbJ on line 4 NULL
Output for 4.3.0 - 5.6.21, 7.0.0 - 7.0.12
Output for hhvm-3.12.0
Warning: Second argument has to be between 1 and the number of elements in the array in /in/XJPbJ on line 4 NULL
Output for hhvm-3.10.0

Process exited with code 153.