|
2 | 2 | +----------------------------------------------------------------------+ |
3 | 3 | | Xdebug | |
4 | 4 | +----------------------------------------------------------------------+ |
5 | | - | Copyright (c) 2002-2024 Derick Rethans | |
| 5 | + | Copyright (c) 2002-2025 Derick Rethans | |
6 | 6 | +----------------------------------------------------------------------+ |
7 | 7 | | This source file is subject to version 1.01 of the Xdebug license, | |
8 | 8 | | that is bundled with this package in the file LICENSE, and is | |
@@ -244,6 +244,23 @@ void xdebug_var_export_line(zval **struc, xdebug_str *str, int level, int debug_ |
244 | 244 | case IS_OBJECT: { |
245 | 245 | #if PHP_VERSION_ID >= 80100 |
246 | 246 | zend_class_entry *ce = Z_OBJCE_P(*struc); |
| 247 | +#endif |
| 248 | + |
| 249 | +#if PHP_VERSION_ID >= 80400 |
| 250 | + if ( |
| 251 | + ce->type != ZEND_INTERNAL_CLASS && |
| 252 | + zend_object_is_lazy(Z_OBJ_P(*struc)) && |
| 253 | + !zend_lazy_object_initialized(Z_OBJ_P(*struc)) |
| 254 | + ) { |
| 255 | + xdebug_str_add_literal(str, "class "); |
| 256 | + xdebug_str_add(str, ZSTR_VAL(Z_OBJCE_P(*struc)->name), 0); |
| 257 | + xdebug_str_add_literal(str, " { *uninitialized ghost* }"); |
| 258 | + |
| 259 | + break; /* Jump out of the function */ |
| 260 | + } |
| 261 | +#endif |
| 262 | + |
| 263 | +#if PHP_VERSION_ID >= 80100 |
247 | 264 | if (ce->ce_flags & ZEND_ACC_ENUM) { |
248 | 265 | zval *case_name_zval = zend_enum_fetch_case_name(Z_OBJ_P(*struc)); |
249 | 266 | xdebug_str_add_fmt(str, "enum %s::%s", ZSTR_VAL(ce->name), Z_STRVAL_P(case_name_zval)); |
|
0 commit comments