3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $config['base_validation_rules']['account_email'] = [ 'field' => 'account_email', 'label' => 'Account Email Address', 'rules' => [ 'trim', 'valid_email', 'check_burner_email', 'check_ban', 'check_ip_address' ]]; print_r ( array_replace_recursive( $config['base_validation_rules']['account_email'], ['rules'=>['required'], 'label'=>'test'], $config['base_validation_rules']['account_email'])); print_r ( array_merge_recursive(['rules'=>['required'], 'label'=>'test'], $config['base_validation_rules']['account_email']));
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
Array ( [field] => account_email [label] => Account Email Address [rules] => Array ( [0] => trim [1] => valid_email [2] => check_burner_email [3] => check_ban [4] => check_ip_address ) ) Array ( [rules] => Array ( [0] => required [1] => trim [2] => valid_email [3] => check_burner_email [4] => check_ban [5] => check_ip_address ) [label] => Array ( [0] => test [1] => Account Email Address ) [field] => account_email )