If you want to create a static method that you can copy and paste into each class you have constants created, you can use:
<php
public static function get_class_constants(): array
{
$reflect = new ReflectionClass(self::class);
return $reflect->getConstants();
}
?>