3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array( 't' => array( 'foo' => 'bar', 'bar' => 'foo', 'kip' => array( 'zonder', 'kop', ), ), 'b' => (object) array_combine(range('a', 'z'), range('a', 'z')), ); $arr2 = array( 't' => array( 'foo' => 'aangepast', ), ); $arr3 = array_replace_recursive($arr1, $arr2); echo'<pre>'; print_r($arr1); echo'<hr/>'; print_r($arr2); echo'<hr/>'; print_r($arr3); echo'<hr/>';
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [t] => Array ( [foo] => bar [bar] => foo [kip] => Array ( [0] => zonder [1] => kop ) ) [b] => stdClass Object ( [a] => a [b] => b [c] => c [d] => d [e] => e [f] => f [g] => g [h] => h [i] => i [j] => j [k] => k [l] => l [m] => m [n] => n [o] => o [p] => p [q] => q [r] => r [s] => s [t] => t [u] => u [v] => v [w] => w [x] => x [y] => y [z] => z ) ) <hr/>Array ( [t] => Array ( [foo] => aangepast ) ) <hr/>Array ( [t] => Array ( [foo] => aangepast [bar] => foo [kip] => Array ( [0] => zonder [1] => kop ) ) [b] => stdClass Object ( [a] => a [b] => b [c] => c [d] => d [e] => e [f] => f [g] => g [h] => h [i] => i [j] => j [k] => k [l] => l [m] => m [n] => n [o] => o [p] => p [q] => q [r] => r [s] => s [t] => t [u] => u [v] => v [w] => w [x] => x [y] => y [z] => z ) ) <hr/>

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:
43.77 ms | 405 KiB | 8 Q