Browse Source

Add optional parameter to debug_backtrace().

experimental/5.2-WITH_DRCP
Sebastian Bergmann 19 years ago
parent
commit
d0d1e42c75
  1. 3
      NEWS
  2. 10
      Zend/zend_builtin_functions.c

3
NEWS

@ -1,5 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 20??, PHP 5.2.5
- Added optional parameter $provide_object to debug_backtrace(). (Sebastian)
30 Aug 2007, PHP 5.2.4
- Removed --enable-versioning configure option. (Jani)

10
Zend/zend_builtin_functions.c

@ -2093,15 +2093,17 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
/* }}} */
/* {{{ proto array debug_backtrace(void)
/* {{{ proto array debug_backtrace([bool provide_object])
Return backtrace as array */
ZEND_FUNCTION(debug_backtrace)
{
if (ZEND_NUM_ARGS()) {
ZEND_WRONG_PARAM_COUNT();
zend_bool provide_object = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &provide_object) == FAILURE) {
return;
}
zend_fetch_debug_backtrace(return_value, 1, 1 TSRMLS_CC);
zend_fetch_debug_backtrace(return_value, 1, provide_object TSRMLS_CC);
}
/* }}} */

Loading…
Cancel
Save