3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array('a', 'b', 'c', 'd', 'e', 'f'); foreach($array as $key => $value) { unset($arr[$key+1]); echo $value . "\n"; }
Output for 5.0.4 - 7.1.7
Notice: Undefined variable: arr in /in/Ah7lT on line 6 a Notice: Undefined variable: arr in /in/Ah7lT on line 6 b Notice: Undefined variable: arr in /in/Ah7lT on line 6 c Notice: Undefined variable: arr in /in/Ah7lT on line 6 d Notice: Undefined variable: arr in /in/Ah7lT on line 6 e Notice: Undefined variable: arr in /in/Ah7lT on line 6 f
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: arr in /in/Ah7lT on line 6 a Notice: Undefined variable: arr in /in/Ah7lT on line 6 b Notice: Undefined variable: arr in /in/Ah7lT on line 6 c Notice: Undefined variable: arr in /in/Ah7lT on line 6 d Notice: Undefined variable: arr in /in/Ah7lT on line 6 e Notice: Undefined variable: arr in /in/Ah7lT on line 6 f