# Feature Request Given the following code: ```php class A { public const A1 = 'A1 Value'; protected const A2 = 'A2 Value'; private const A3 = 'A3 Value'; } ``` in PHP 8.0+, we can code: ```diff $reflectionClass = new ReflectionClass('A'); +var_dump($reflectionClass->getConstants(ReflectionClassConstant::IS_PUBLIC)); ``` It stil no downgrade rule to downgrade it to be like this in PHP 7.x: ```diff $reflectionClass = new ReflectionClass('A'); +$reflectionClassConstants = $reflectionClass->getReflectionConstants(); +$result = []; +array_walk($reflectionClassConstants, function ($value) use (&$result) { + if ($value->isPublic()) { + $result[$value->getName()] = $value->getValue(); + } +}); +var_dump($result); ``` Ref https://github.com/rectorphp/rector/issues/6864 which currently manually fixed by downgrade to php 7.x compatible syntax at https://github.com/rectorphp/rector-src/pull/1474