3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach (array_rand($numbers, 19) as $key) { echo '<div class="avatar"><img src="'.$numbers[$key].'.png" /></div>'; }?>
Output for 5.3.0 - 7.1.0
Notice: Undefined variable: numbers in /in/JkoDW on line 1 Warning: array_rand() expects parameter 1 to be array, null given in /in/JkoDW on line 1 Warning: Invalid argument supplied for foreach() in /in/JkoDW on line 1
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: numbers in /in/JkoDW on line 1 Warning: array_rand(): First argument has to be an array in /in/JkoDW on line 1 Warning: Invalid argument supplied for foreach() in /in/JkoDW on line 1
Output for 4.3.2 - 4.3.10, 4.4.0 - 5.0.3
Notice: Undefined variable: numbers in /in/JkoDW on line 1 Warning: array_rand(): First argument has to be an array in /in/JkoDW on line 1 Warning: Invalid argument supplied for foreach() in /in/JkoDW on line 1
Output for 4.3.11
Notice: Undefined variable: numbers in /in/JkoDW on line 1 Warning: array_rand(): First argument has to be an array in /in/JkoDW on line 1
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: numbers in /in/JkoDW on line 1 Warning: array_rand() [http://www.php.net/function.array-rand]: First argument has to be an array in /in/JkoDW on line 1 Warning: Invalid argument supplied for foreach() in /in/JkoDW on line 1