3v4l.org

run code in 300+ PHP versions simultaneously
<?php $live_quotations = [ 'June 2015' => [ 'LOW' => [160.50], 'MEDIUM' => [0.00], 'HIGH' => [60.80] ], 'July 2015' => [ 'MEDIUM' => [226.00], 'HIGH' => [263.00], 'LOW' => [121.96] ] ]; $ordered_defaults = array_fill_keys(['LOW', 'MEDIUM', 'HIGH'], 0); foreach ($live_quotations as $date => $likelihoods) { $live_quotations[$date] = array_replace($ordered_defaults, $likelihoods); } var_export($live_quotations);
Output for git.master_jit, git.master, rfc.property-hooks
array ( 'June 2015' => array ( 'LOW' => array ( 0 => 160.5, ), 'MEDIUM' => array ( 0 => 0.0, ), 'HIGH' => array ( 0 => 60.8, ), ), 'July 2015' => array ( 'LOW' => array ( 0 => 121.96, ), 'MEDIUM' => array ( 0 => 226.0, ), 'HIGH' => array ( 0 => 263.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:
140.27 ms | 406 KiB | 5 Q