3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr[999][] = 'first'; $arr[256][] = 'sec'; $arr[123][] = 'third'; $arr[555][] = 'four'; $arr[256][] = 'five'; foreach($arr AS $strData) { var_dump($strData); //echo $strData . PHP_EOL; }
based on A63lZ
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
array(1) { [0]=> string(5) "first" } array(2) { [0]=> string(3) "sec" [1]=> string(4) "five" } array(1) { [0]=> string(5) "third" } array(1) { [0]=> string(4) "four" }