3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrStart = [ 0 => [ "start" => "04/26/2015 8:00 AM", ], 1 => [ "start" => "04/26/2015 9:00 AM", ], ]; $arrEnd = [ 0 => [ "end" => "04/26/2015 10:00 AM", ], 1 => [ "end" => "04/26/2015 11:00 AM", ], ]; $keys = [ 0 => "1", 1 => "3", ]; $result = []; foreach ($keys as $i => $key) { $result[$key] = [ 'start' => $arrStart[$i][0], 'end' => $arrEnd[$i][0], ]; } var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 0 in /in/GoWiV on line 30 Warning: Undefined array key 0 in /in/GoWiV on line 31 Warning: Undefined array key 0 in /in/GoWiV on line 30 Warning: Undefined array key 0 in /in/GoWiV on line 31 array(2) { [1]=> array(2) { ["start"]=> NULL ["end"]=> NULL } [3]=> array(2) { ["start"]=> NULL ["end"]=> NULL } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.1 ms | 402 KiB | 8 Q