mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Do nesting for internal execute hook
This commit is contained in:
@@ -298,12 +298,16 @@ static void zend_test_execute_internal(zend_execute_data *execute_data, zval *re
|
||||
}
|
||||
}
|
||||
|
||||
ZT_G(observer_nesting_depth)++;
|
||||
|
||||
if (zend_test_prev_execute_internal) {
|
||||
zend_test_prev_execute_internal(execute_data, return_value);
|
||||
} else {
|
||||
fbc->internal_function.handler(execute_data, return_value);
|
||||
}
|
||||
|
||||
ZT_G(observer_nesting_depth)--;
|
||||
|
||||
if (fbc->common.function_name) {
|
||||
if (EG(exception)) {
|
||||
php_printf("%*s<!-- Exception: %s -->\n", 2 * ZT_G(observer_nesting_depth), "", ZSTR_VAL(EG(exception)->ce->name));
|
||||
|
||||
@@ -14,6 +14,8 @@ function f($a) {
|
||||
|
||||
f(time() > 0 ? [1, 2, 3] : []);
|
||||
|
||||
array_map("count", [[], [1, 2]]);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
<!-- internal enter time() -->
|
||||
@@ -23,3 +25,13 @@ f(time() > 0 ? [1, 2, 3] : []);
|
||||
<!-- internal enter var_dump() -->
|
||||
int(6)
|
||||
<!-- internal leave var_dump():NULL -->
|
||||
<!-- internal enter array_map() -->
|
||||
<!-- internal enter count() -->
|
||||
<!-- internal leave count():0 -->
|
||||
<!-- internal enter count() -->
|
||||
<!-- internal leave count():2 -->
|
||||
<!-- internal leave array_map():
|
||||
array (
|
||||
0 => 0,
|
||||
1 => 2,
|
||||
) -->
|
||||
|
||||
Reference in New Issue
Block a user