On Fri, 16 Aug 2024, 16:46 Christoph M. Becker, <cmbecke...@gmx.de> wrote:
> On 16.08.2024 at 17:11, Nicolas > > > > And here is a one liner: > > > > function get_declared_enums() { > > return array_filter(get_declared_classes(), 'enum_exists'); > > } > > Nice! > > Are you suggesting that there is no need for get_declared_enums() in the > core, since it can be implemented in userland with a single function call? > > I think he just compulsively golfs inefficient PHP code (I have the same > affliction). > Possibly :D I shared this as food for thoughts. I'm not convinced this function would be useful personally, but that's not really an argument ;)