3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search_array = array('first' => 1, 'second' => 4, 'third' => 3); foreach($search_array as $key => $value){ echo $key; echo $key.".adding"; $a=explode(".",$key); echo $a[0]; echo $a[1]; }
based on JZrcF
Output for 5.6.38 - 7.3.0rc3
firstfirst.addingfirst Notice: Undefined offset: 1 in /in/NOrLc on line 9 secondsecond.addingsecond Notice: Undefined offset: 1 in /in/NOrLc on line 9 thirdthird.addingthird Notice: Undefined offset: 1 in /in/NOrLc on line 9