3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $defaultOptions = array( 'listClass' => 'default', 'test' => 'test' ); $options = array( 'listClass' => 'new', 'id' => '1', 'array' => array('test'=>'no') ); $options = $defaultOptions + $options; print_r($options);
based on FYkBm
Output for 4.3.0 - 7.2.0
Array ( [listClass] => default [test] => test [id] => 1 [array] => Array ( [test] => no ) )