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_merge( ['rules'=>['required'], 'label'=>'test'],$config['base_validation_rules']['account_email'])); print_r ( array_merge( $config['base_validation_rules']['account_email'],['rules'=>['required'], 'label'=>'test'])); print_r ( array_replace_recursive( $config['base_validation_rules']['account_email'],['rules'=>['required'], 'label'=>'test'])); print_r ( array_replace_recursive( ['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'])); print_r ( array_merge_recursive([$config['base_validation_rules']['account_email'], 'rules'=>['required'], 'label'=>'test']));