summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2002-09-18 14:08:07 +0000
committerZeev Suraski <zeev@php.net>2002-09-18 14:08:07 +0000
commit7dfa439185dd6c62d3c73b4974f7e62ac54aec7f (patch)
tree71338bb847149224762e3211110d6c1d005f2b85
parent3ae9127b465ca1596c2f42b4bd3ba8f6e819d1d9 (diff)
downloadphp-git-7dfa439185dd6c62d3c73b4974f7e62ac54aec7f.tar.gz
Add useful debugging function
-rw-r--r--Zend/zend_builtin_functions.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index fdc9c49f9b..2c2fedd871 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -70,6 +70,7 @@ static ZEND_FUNCTION(get_defined_constants);
static ZEND_FUNCTION(debug_backtrace);
#if ZEND_DEBUG
static ZEND_FUNCTION(zend_test_func);
+static ZEND_FUNCTION(zend_thread_id);
#endif
ZEND_API unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
@@ -124,6 +125,7 @@ static zend_function_entry builtin_functions[] = {
ZEND_FE(debug_backtrace, NULL)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
+ ZEND_FE(zend_thread_id, NULL)
#endif
{ NULL, NULL, NULL }
};
@@ -1180,6 +1182,12 @@ ZEND_FUNCTION(zend_test_func)
zend_get_parameters(ht, 2, &arg1, &arg2);
}
+
+
+ZEND_FUNCTION(zend_thread_id)
+{
+ RETURN_LONG(tsrm_thread_id());
+}
#endif
/* {{{ proto string get_resource_type(resource res)