3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $r = array_rand(0,30); print_r($r);
Output for 5.3.0 - 7.1.0
Warning: array_rand() expects parameter 1 to be array, integer given in /in/GmiYV on line 3
Output for 4.3.2 - 5.2.17
Warning: array_rand(): First argument has to be an array in /in/GmiYV on line 3
Output for 4.3.0 - 4.3.1
Warning: array_rand() [http://www.php.net/function.array-rand]: First argument has to be an array in /in/GmiYV on line 3