3v4l.org

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