3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( 'a' => 1, 'c' => 3, 'e' => 5, ); $template = array_flip(array('a', 'b', 'c', 'd', 'e')); var_dump($array + $template);
Output for 4.3.0 - 7.2.0
array(5) { ["a"]=> int(1) ["c"]=> int(3) ["e"]=> int(5) ["b"]=> int(1) ["d"]=> int(3) }