3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $one = [1]; $two = [42]; $arr1 = ['k' => &$one]; $arr2 = ['k' => &$two]; var_dump(current($one), current($two)); array_replace_recursive($arr1, $arr2); var_dump(current($one), current($two));
based on v4eT8
Output for 5.5.0 - 5.6.28, 7.0.20 - 7.2.0
int(1) int(42) int(1) int(42)
Output for 7.0.0 - 7.0.7
int(1) int(42) int(42) int(42)