3v4l.org

run code in 300+ PHP versions simultaneously
<?php $global = [ 'foo' => 1, ]; $default = [ 'foo' => 0, ]; var_export( array_merge_recursive( $default, $global ) );
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.32, 8.0.0 - 8.0.24, 8.1.0 - 8.1.11
array ( 'foo' => array ( 0 => 0, 1 => 1, ), )

preferences:
90.68 ms | 417 KiB | 14 Q