3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array1 = array( 'k' => array( 2 => 100, 98 => 200, ) ); $array2 = array( 'k' => array( 64 => 300 ) ); $array3 = array_merge_recursive( $array1, $array2 ); echo '<pre>'; var_dump( $array3 ); echo 'count: '.count( $array3['k'] ); phpinfo(); ?>
Output for 7.2.6
<pre>array(1) { ["k"]=> array(3) { [2]=> int(100) [98]=> int(200) [2]=> int(300) } } count: 3 Warning: phpinfo() has been disabled for security reasons in /in/cFWEt on line 21