3v4l.org

run code in 300+ PHP versions simultaneously
<?php $months = [ 'January', 'January', 'January', 'January', 'February' ]; $weeks = [ 'Week 1', 'Week 2', 'Week 3', 'Week 4', 'Week 1' ]; $newArray = array_map(function($index, $month) use ($weeks) { return $month . ' - ' . $weeks[$index]; }, array_keys($months), $months); print_r($newArray);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => January - Week 1 [1] => January - Week 2 [2] => January - Week 3 [3] => January - Week 4 [4] => February - Week 1 )

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:
42.15 ms | 1267 KiB | 4 Q