mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.0'
* PHP-7.0: Allow "proxy" ovjects to substitute their class names through get_class_name() handler (similar to var_dump() and others).
This commit is contained in:
commit
f8faffe37e
2 changed files with 15 additions and 5 deletions
|
@ -527,11 +527,13 @@ static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */
|
|||
case IS_ARRAY:
|
||||
smart_str_appends(str, "Array, ");
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
case IS_OBJECT: {
|
||||
zend_string *class_name = Z_OBJ_HANDLER_P(arg, get_class_name)(Z_OBJ_P(arg));
|
||||
smart_str_appends(str, "Object(");
|
||||
smart_str_appends(str, ZSTR_VAL(Z_OBJCE_P(arg)->name));
|
||||
smart_str_appends(str, ZSTR_VAL(class_name));
|
||||
smart_str_appends(str, "), ");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue