3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array_fill(5, 6, 'banana'); $b = array_fill(-2, 4, 'pear'); print_r($a); print_r($b); ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [5] => banana [6] => banana [7] => banana [8] => banana [9] => banana [10] => banana ) Array ( [-2] => pear [0] => pear [1] => pear [2] => pear )