3v4l.org

run code in 300+ PHP versions simultaneously
<?php $base = array('citrus' => array("orange") , 'berries' => array("blackberry", "raspberry"), 'others' => 'banana' ); $replacements = array('citrus' => 'pineapple', 'berries' => array('blueberry'), 'others' => array('litchis')); $replacements2 = array('citrus' => array('pineapple'), 'berries' => array('blueberries'), 'others' => 'litchis'); $basket = array_replace_recursive($base, $replacements, $replacements2); print_r($basket);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [citrus] => Array ( [0] => pineapple ) [berries] => Array ( [0] => blueberries [1] => raspberry ) [others] => litchis )

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:
47.68 ms | 401 KiB | 8 Q