00001 <?php 00002 // +----------------------------------------------------------------------+ 00003 // | PHP Version 4 | 00004 // +----------------------------------------------------------------------+ 00005 // | Copyright (c) 1997-2004 The PHP Group | 00006 // +----------------------------------------------------------------------+ 00007 // | This source file is subject to version 3.0 of the PHP license, | 00008 // | that is bundled with this package in the file LICENSE, and is | 00009 // | available at through the world-wide-web at | 00010 // | http://www.php.net/license/3_0.txt. | 00011 // | If you did not receive a copy of the PHP license and are unable to | 00012 // | obtain it through the world-wide-web, please send a note to | 00013 // | license@php.net so we can mail you a copy immediately. | 00014 // +----------------------------------------------------------------------+ 00015 // | Authors: Aidan Lister <aidan@php.net> | 00016 // +----------------------------------------------------------------------+ 00017 // 00018 // $Id: array_key_exists.php 2 2009-03-16 20:22:51Z ggiunta $ 00019 00020 00032 if (!function_exists('array_key_exists')) { 00033 function array_key_exists($key, $search) 00034 { 00035 if (!is_scalar($key)) { 00036 user_error('array_key_exists() The first argument should be either a string or an integer', 00037 E_USER_WARNING); 00038 return false; 00039 } 00040 00041 if (is_object($search)) { 00042 $search = get_object_vars($search); 00043 } 00044 00045 if (!is_array($search)) { 00046 user_error('array_key_exists() The second argument should be either an array or an object', 00047 E_USER_WARNING); 00048 return false; 00049 } 00050 00051 return in_array($key, array_keys($search)); 00052 } 00053 } 00054 00055 ?>
Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved. MyOOS [Shopsystem] is Free Software released under the GNU/GPL License. Webmaster: info@r23.de (Impressum) |
|