3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array('test','test'); echo array_rand($array,3);
based on U2341
Output for 4.3.2 - 7.2.0
Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in /in/nkOr0 on line 3
Output for 4.3.0 - 4.3.1
Warning: array_rand() [http://www.php.net/function.array-rand]: Second argument has to be between 1 and the number of elements in the array in /in/nkOr0 on line 3