3v4l.org

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