merge() public static method

Merge several arrays, preserving dot notation.
public static merge ( array[] $arrays ) : array
$arrays array[]
return array
 /**
  *
  */
 public function testApiInvoke_MergesConfiguration()
 {
     $overwrite = $this->createOverwriteHandler();
     $old = $this->getRawData();
     $new = ['b' => ['b' => 'new_Option'], 'h' => 'test', 'a' => 5];
     $data = $overwrite($old, $new);
     $this->assertSame(ArraySupport::merge([$old, $new]), $data);
 }
示例#2
0
 /**
  * @param array $old
  * @param array $new
  * @return array
  */
 public function __invoke($old, $new)
 {
     return ArraySupport::merge([$old, $new]);
 }