3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '2018-03-12' => [ 'United States' => 4, 'Australia' => 15, 'United Kingdom' => 0, 'New Zealand' => 0, ], '2018-03-13' => [ 'United States' => 0, 'Australia' => 8, 'United Kingdom' => 2, 'New Zealand' => 0, ] ]; foreach ($array as $key => $subarray) { $result[] = array_merge([$key], array_values($subarray)); } var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => '2018-03-12', 1 => 4, 2 => 15, 3 => 0, 4 => 0, ), 1 => array ( 0 => '2018-03-13', 1 => 0, 2 => 8, 3 => 2, 4 => 0, ), )

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:
185.36 ms | 405 KiB | 5 Q