1--TEST-- 2Test array_key_exists() function : basic functionality 3--FILE-- 4<?php 5/* Prototype : bool array_key_exists(mixed $key, array $search) 6 * Description: Checks if the given key or index exists in the array 7 * Source code: ext/standard/array.c 8 * Alias to functions: key_exists 9 */ 10 11/* 12 * Test basic functionality of array_key_exists() 13 */ 14 15echo "*** Testing array_key_exists() : basic functionality ***\n"; 16 17$key1 = 'key'; 18$key2 = 'val'; 19$search = array('one', 'key' => 'value', 'val'); 20var_dump(array_key_exists($key1, $search)); 21var_dump(array_key_exists($key2, $search)); 22 23echo "Done"; 24?> 25--EXPECT-- 26*** Testing array_key_exists() : basic functionality *** 27bool(true) 28bool(false) 29Done 30