3v4l.org

run code in 500+ PHP versions simultaneously
<?php $foo = ['foo' => 10]; $bar = ['foo' => 20]; var_dump(array_merge_recursive($foo, $bar)); var_dump(array_replace_recursive($foo, $bar)); $foo = ['foo' => ['bar' => 10]]; $bar = ['foo' => ['bar' => 20]]; var_dump(array_merge_recursive($foo, $bar)); var_dump(array_replace_recursive($foo, $bar));
Output for rfc.property-hooks
array(1) { ["foo"]=> array(2) { [0]=> int(10) [1]=> int(20) } } array(1) { ["foo"]=> int(20) } array(1) { ["foo"]=> array(1) { ["bar"]=> array(2) { [0]=> int(10) [1]=> int(20) } } } array(1) { ["foo"]=> array(1) { ["bar"]=> int(20) } }

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:
49.89 ms | 1347 KiB | 4 Q