3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(1, 2); $count = count($array); for ($i = 0; $i < $count; $i++) { echo "\nChecking $i: \n"; echo "Bad: " . $array['$i'] . "\n"; echo "Good: " . $array[$i] . "\n"; }
based on VSgmo
Output for 5.3.0 - 7.1.0
Checking 0: Notice: Undefined index: $i in /in/CiVsK on line 7 Bad: Good: 1 Checking 1: Notice: Undefined index: $i in /in/CiVsK on line 7 Bad: Good: 2
Output for 4.3.0 - 5.2.17
Checking 0: Notice: Undefined index: $i in /in/CiVsK on line 7 Bad: Good: 1 Checking 1: Notice: Undefined index: $i in /in/CiVsK on line 7 Bad: Good: 2