@@ -566,6 +566,10 @@ static void _class_const_string(smart_str *str, zend_string *name, zend_class_co
566
566
const char * final = ZEND_CLASS_CONST_FLAGS (c ) & ZEND_ACC_FINAL ? "final " : "" ;
567
567
zend_string * type_str = ZEND_TYPE_IS_SET (c -> type ) ? zend_type_to_string (c -> type ) : NULL ;
568
568
const char * type = type_str ? ZSTR_VAL (type_str ) : zend_zval_type_name (& c -> value );
569
+
570
+ if (c -> doc_comment ) {
571
+ smart_str_append_printf (str , "%s%s\n" , indent , ZSTR_VAL (c -> doc_comment ));
572
+ }
569
573
smart_str_append_printf (str , "%sConstant [ %s%s %s %s ] { " ,
570
574
indent , final , visibility , type , ZSTR_VAL (name ));
571
575
if (Z_TYPE (c -> value ) == IS_ARRAY ) {
@@ -889,6 +893,9 @@ static zval *property_get_default(zend_property_info *prop_info) {
889
893
/* {{{ _property_string */
890
894
static void _property_string (smart_str * str , zend_property_info * prop , const char * prop_name , char * indent )
891
895
{
896
+ if (prop && prop -> doc_comment ) {
897
+ smart_str_append_printf (str , "%s%s\n" , indent , ZSTR_VAL (prop -> doc_comment ));
898
+ }
892
899
smart_str_append_printf (str , "%sProperty [ " , indent );
893
900
if (!prop ) {
894
901
smart_str_append_printf (str , "<dynamic> public $%s" , prop_name );
0 commit comments