cvs: ZendEngine2 / zend_builtin_functions.c
| From: | Andi Gutmans | Date: | Mon, 01 Dec 2003 11:53:43 +0000 |
| Subject: | cvs: ZendEngine2 / zend_builtin_functions.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2038@lists.php.net to get a copy of this message | ||
andi Mon Dec 1 06:53:43 2003 EDT
Modified files:
/ZendEngine2 zend_builtin_functions.c
Log:
- Nuke property_exists(). We need to fix isset() and this is already
- supported in reflection API. In any case, it's best not to add new
- functions in the general namespace except for keeping engine consistency
(which would have been true in this case)
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.217 ZendEngine2/zend_builtin_functions.c:1.218
--- ZendEngine2/zend_builtin_functions.c:1.217 Thu Nov 27 12:06:26 2003
+++ ZendEngine2/zend_builtin_functions.c Mon Dec 1 06:53:42 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.217 2003/11/27 17:06:26 helly Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.218 2003/12/01 11:53:42 andi Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -42,7 +42,6 @@
static ZEND_FUNCTION(defined);
static ZEND_FUNCTION(get_class);
static ZEND_FUNCTION(get_parent_class);
-static ZEND_FUNCTION(property_exists);
static ZEND_FUNCTION(method_exists);
static ZEND_FUNCTION(class_exists);
static ZEND_FUNCTION(function_exists);
@@ -100,7 +99,6 @@
ZEND_FE(defined, NULL)
ZEND_FE(get_class, NULL)
ZEND_FE(get_parent_class, NULL)
- ZEND_FE(property_exists, NULL)
ZEND_FE(method_exists, NULL)
ZEND_FE(class_exists, NULL)
ZEND_FE(function_exists, NULL)
@@ -756,28 +754,7 @@
}
}
/* }}} */
-
-
-/* {{{ proto bool property_exists(object obj, string property_name)
- Checks if the object has a property */
-ZEND_FUNCTION(property_exists)
-{
- zval **object, **property;
-
- if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &object, &property)==FAILURE) {
- ZEND_WRONG_PARAM_COUNT();
- }
- if ((*object)->type != IS_OBJECT) {
- RETURN_FALSE;
- }
-
- if (Z_OBJ_HANDLER_PP(object, has_property) && Z_OBJ_HANDLER_PP(object,
has_property)(*object, *property, 1 TSRMLS_CC)) {
- RETURN_TRUE;
- } else {
- RETURN_FALSE;
- }
-}
-/* }}} */
+\
/* {{{ proto bool method_exists(object object, string method)