diff options
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r-- | Zend/zend_builtin_functions.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index a8cc127683..9062cf6f5c 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1495,6 +1495,20 @@ ZEND_FUNCTION(get_resource_type) } /* }}} */ +/* {{{ proto int get_resource_id(resource res) + Get the resource ID for a given resource */ +ZEND_FUNCTION(get_resource_id) +{ + zval *resource; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_RESOURCE(resource) + ZEND_PARSE_PARAMETERS_END(); + + RETURN_LONG(Z_RES_HANDLE_P(resource)); +} +/* }}} */ + /* {{{ proto array get_resources([string resource_type]) Get an array with all active resources */ ZEND_FUNCTION(get_resources) |