> Porting this to C is left as an excercise for the reader. ;)  Hint:
> <https://github.com/php/php-src/blob/8853cf3ae950a1658054f286117bc8f77f724f00/Zend/zend_builtin_functions.c#L1371-L1399>
>

I went ahead and created PR https://github.com/php/php-src/pull/15443
along with tests, UPGRADE notice, etc.

I think having a `get_declared_enums` function will be helpful. The
implementation is simple and straightforward too.

Reply via email to