38 if (!function_exists(
'array_key_exists')) {
39 function array_key_exists($key, $search)
41 if (!is_scalar($key)) {
42 user_error(
'array_key_exists() The first argument should be either a string or an integer',
47 if (is_object($search)) {
48 $search = get_object_vars($search);
51 if (!is_array($search)) {
52 user_error(
'array_key_exists() The second argument should be either an array or an object',
57 return in_array($key, array_keys($search));