3v4l.org

run code in 150+ 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 - 5.6.21, 7.0.0 - 7.1.0
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 hhvm-3.10.0 - 3.12.0
a b c d e 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