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