3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $matches = array('a','b','c','d','e','f','g','h','i','j','k','l'); for($i = 0; $i <= count($matches[0]); $i++ ) echo "href = {$matches[1][$i]}, alt = {$matches[2][$i]}";
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/5bqdR on line 4 href = b, alt = c Warning: count(): Parameter must be an array or an object that implements Countable in /in/5bqdR on line 4 Notice: Uninitialized string offset: 1 in /in/5bqdR on line 5 Notice: Uninitialized string offset: 1 in /in/5bqdR on line 5 href = , alt = Warning: count(): Parameter must be an array or an object that implements Countable in /in/5bqdR on line 4
Output for 5.2.10 - 7.1.7
href = b, alt = c Notice: Uninitialized string offset: 1 in /in/5bqdR on line 5 Notice: Uninitialized string offset: 1 in /in/5bqdR on line 5 href = , alt =
Output for 4.3.0 - 5.2.9
href = b, alt = c Notice: Uninitialized string offset: 1 in /in/5bqdR on line 5 Notice: Uninitialized string offset: 1 in /in/5bqdR on line 5 href = , alt =