3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for ($i = 5; $i > 0; $i--) { $ratingAvg[$i] = 0; } var_dump($ratingAvg); $ratingAvg = array_fill(5,1,0); var_dump($ratingAvg);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(5) { [5]=> int(0) [4]=> int(0) [3]=> int(0) [2]=> int(0) [1]=> int(0) } array(1) { [5]=> int(0) }