3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $my_array=array(array('month'=> 3, 'day'=> 4, 'hour' => 1, 'minut' => 15, 'year'=> 2014), array('month'=> 5, 'day'=> 7, 'hour' => 1, 'minut' => 50, 'year'=> 2012) ); $i=0; foreach($my_array as $k => $v) { $new_array[i] = $v["year"]."-".$v["month"]."-".$v["day"]." ".$v["hour"].$v["minut"]; $i++; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
Notice: Use of undefined constant i - assumed 'i' in /in/q8KbT on line 16 Notice: Use of undefined constant i - assumed 'i' in /in/q8KbT on line 16
Output for hhvm-3.12.0
Notice: Use of undefined constant i - assumed 'i' in /in/q8KbT on line -1 Notice: Use of undefined constant i - assumed 'i' in /in/q8KbT on line -1