summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_diff_key_basic.phpt
blob: 0249e2c27d70ed346f64bca0fec184c4f6751fe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Test array_diff_key() : basic functionality
--FILE--
<?php
/*
* proto array array_diff_key(array arr1, array arr2 [, array ...])
* Function is implemented in ext/standard/array.c
*/
$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
var_dump(array_diff_key($array1, $array2));
?>
--EXPECT--
array(2) {
  ["red"]=>
  int(2)
  ["purple"]=>
  int(4)
}