3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php for($i=0; $i<count($arr); $i=$i+2) { $ar = array_slice($arr, $i, 2, true); echo "<li>\n"; foreach($ar as $key=>$value) { echo "$value\n"; } echo "</li>\n"; }
Output for 7.2.0 - 7.3.0rc4
Notice: Undefined variable: arr in /in/chhGE on line 2 Warning: count(): Parameter must be an array or an object that implements Countable in /in/chhGE on line 2
Output for 5.5.0 - 7.1.20
Notice: Undefined variable: arr in /in/chhGE on line 2
Output for 4.3.0 - 5.4.45