3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array_fill(0, 10, NULL); for ($i = 0; $i < 10; $i += 1) { $arr[$i] = rand(0, 10); } //for ($i = 0; $i < 10; $i += 1) { //echo sprintf("Array element %d. Value contained is %d", $i, $arr[$i]); //} echo $arr[$i]; ?>
based on ptegu
Output for 5.3.0 - 7.1.0
Notice: Undefined offset: 10 in /in/IkUGr on line 11
Output for 4.3.0 - 5.2.17
Notice: Undefined offset: 10 in /in/IkUGr on line 11