3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array('a','b','c'); for ($i=0;$i<5;$i++) { if ($i < count($arr)) { echo "arr[$i] = " . $arr[$i] . "<br>\n"; } else { echo "arr[$i] = undefined<br>\n"; } }
based on stAA3
Output for 4.3.0 - 7.2.0
arr[0] = a<br> arr[1] = b<br> arr[2] = c<br> arr[3] = undefined<br> arr[4] = undefined<br>