Index: basic_functions.c =================================================================== RCS file: /repository/php-src/ext/standard/basic_functions.c,v retrieving revision 1.725.2.1 diff -u -r1.725.2.1 basic_functions.c --- basic_functions.c 10 Aug 2005 12:02:52 -0000 1.725.2.1 +++ basic_functions.c 10 Aug 2005 23:26:10 -0000 @@ -459,6 +459,7 @@ PHP_FE(var_dump, NULL) PHP_FE(var_export, NULL) PHP_FE(debug_zval_dump, NULL) + PHP_FE(debug_get_object_handle, NULL) PHP_FE(print_r, NULL) #if MEMORY_LIMIT PHP_FE(memory_get_usage, NULL) Index: php_var.h =================================================================== RCS file: /repository/php-src/ext/standard/php_var.h,v retrieving revision 1.30 diff -u -r1.30 php_var.h --- php_var.h 3 Aug 2005 14:08:11 -0000 1.30 +++ php_var.h 10 Aug 2005 23:26:10 -0000 @@ -31,6 +31,7 @@ #if MEMORY_LIMIT PHP_FUNCTION(memory_get_usage); #endif +PHP_FUNCTION(debug_get_object_handle); PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC); PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC); Index: var.c =================================================================== RCS file: /repository/php-src/ext/standard/var.c,v retrieving revision 1.203 diff -u -r1.203 var.c --- var.c 3 Aug 2005 14:08:15 -0000 1.203 +++ var.c 10 Aug 2005 23:26:11 -0000 @@ -887,6 +887,17 @@ /* }}} */ #endif + +PHP_FUNCTION(debug_get_object_handle) +{ + zval *obj; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { + return; + } + + RETURN_LONG(Z_OBJ_HANDLE_P(obj)); +} /* * Local variables: * tab-width: 4