Display the drop-down list

Test of array_replace_recursive()

Example #1 : test success
Example #2 : test success
Example #1
$input = [
  
=> [
    
'citrus' => [
      
=> 'orange',
    ],
    
'berries' => [
      
=> 'blackberry',
      
=> 'raspberry',
    ],
  ],
  
=> [
    
'citrus' => [
      
=> 'pineapple',
    ],
    
'berries' => [
      
=> 'blueberry',
    ],
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
'citrus' => [
        
=> 'pineapple',
      ],
      
'berries' => [
        
=> 'blueberry',
        
=> 'raspberry',
      ],
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> [
    
'citrus' => [
      
=> 'orange',
    ],
    
'berries' => [
      
=> 'blackberry',
      
=> 'raspberry',
    ],
    
'others' => 'banana',
  ],
  
=> [
    
'citrus' => 'pineapple',
    
'berries' => [
      
=> 'blueberry',
    ],
    
'others' => [
      
=> 'litchis',
    ],
  ],
  
=> [
    
'citrus' => [
      
=> 'pineapple',
    ],
    
'berries' => [
      
=> 'blueberry',
    ],
    
'others' => 'litchis',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
'citrus' => [
        
=> 'pineapple',
      ],
      
'berries' => [
        
=> 'blueberry',
        
=> 'raspberry',
      ],
      
'others' => 'litchis',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]