Skip to content

Commit 3fea646

Browse files
authored
phpdbg: Call enums “Enum” and traits “Trait” in info classes (php#17191)
* phpdbg: Call enums “Enum” in `info classes` * phpdbg: Call traits “Trait” in `info classes`
1 parent 97f44b7 commit 3fea646

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sapi/phpdbg/phpdbg_info.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,11 @@ PHPDBG_INFO(memory) /* {{{ */
374374
static inline void phpdbg_print_class_name(zend_class_entry *ce) /* {{{ */
375375
{
376376
const char *visibility = ce->type == ZEND_USER_CLASS ? "User" : "Internal";
377-
const char *type = (ce->ce_flags & ZEND_ACC_INTERFACE) ? "Interface" : (ce->ce_flags & ZEND_ACC_ABSTRACT) ? "Abstract Class" : "Class";
377+
const char *type = (ce->ce_flags & ZEND_ACC_INTERFACE) ? "Interface"
378+
: (ce->ce_flags & ZEND_ACC_ABSTRACT) ? "Abstract Class"
379+
: (ce->ce_flags & ZEND_ACC_ENUM) ? "Enum"
380+
: (ce->ce_flags & ZEND_ACC_TRAIT) ? "Trait"
381+
: "Class";
378382

379383
phpdbg_writeln("%s %s %.*s (%d)", visibility, type, (int) ZSTR_LEN(ce->name), ZSTR_VAL(ce->name), zend_hash_num_elements(&ce->function_table));
380384
} /* }}} */

0 commit comments

Comments
 (0)