3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array2array($src,&$target) { $arg_list = func_get_args(); unset($arg_list[0]); unset($arg_list[1]); foreach ($arg_list as $arg) { $target[$arg]=$src[$arg]; } } $a=['a'=>1,'b'=>2,'c'=>3,'d'=>4]; $b=['e'=>5]; array2array($a,$b,'b','c'); echo json_encode($b,JSON_UNESCAPED_UNICODE);
Output for git.master, git.master_jit, rfc.property-hooks
{"e":5,"b":2,"c":3}

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