<?php enum TestEnum: string { /** Description about Case. */ case ABC = 'abc'; case XYZ = 'xyz'; /** @var string */ public const QWERTY = 'qwerty'; } $reflectionClass = new ReflectionClass(TestEnum::class); var_dump($reflectionClass->getProperties()[0]->getDocComment()); var_dump($reflectionClass->getProperties()[1]->getDocComment()); var_dump($reflectionClass->getReflectionConstants()[0]->getDocComment()); var_dump($reflectionClass->getReflectionConstants()[1]->getDocComment()); var_dump($reflectionClass->getReflectionConstants()[2]->getDocComment());
You have javascript disabled. You will not be able to edit any code.