3v4l.org

run code in 300+ PHP versions simultaneously
<?php $struct = [ 'username' => '', 'password' => '', 'someId' => 1, ]; $input = [ 'username' => '', 'password' => '', 'someId' => 1, ]; var_dump(array_merge_recursive($input, $struct)); var_dump(array_diff(array_merge_recursive($input, $struct), $struct));
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { ["username"]=> array(2) { [0]=> string(0) "" [1]=> string(0) "" } ["password"]=> array(2) { [0]=> string(0) "" [1]=> string(0) "" } ["someId"]=> array(2) { [0]=> int(1) [1]=> int(1) } } Warning: Array to string conversion in /in/1g4cN on line 17 Warning: Array to string conversion in /in/1g4cN on line 17 Warning: Array to string conversion in /in/1g4cN on line 17 array(3) { ["username"]=> array(2) { [0]=> string(0) "" [1]=> string(0) "" } ["password"]=> array(2) { [0]=> string(0) "" [1]=> string(0) "" } ["someId"]=> array(2) { [0]=> int(1) [1]=> int(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:
55.49 ms | 403 KiB | 8 Q