diffKeys() public method

Get the items in the collection whose keys are not present in the given items.
public diffKeys ( mixed $items ) : static
$items mixed
return static
Beispiel #1
0
 public function testDiffKeys()
 {
     $c1 = new Collection(['id' => 1, 'first_word' => 'Hello']);
     $c2 = new Collection(['id' => 123, 'foo_bar' => 'Hello']);
     $this->assertEquals(['first_word' => 'Hello'], $c1->diffKeys($c2)->all());
 }