Re: [RFC] [Discussion] Add get_declared_enums() function

From: Date: Fri, 04 Oct 2024 14:07:38 +0000
Subject: Re: [RFC] [Discussion] Add get_declared_enums() function
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-125746@lists.php.net to get a copy of this message
Hi Am 2024-10-03 14:01, schrieb Gina P. Banyard:
As a counterpoint to the argument presented on the list that Enums should still be returned by get_declared_list() because they are "classes": Interfaces and traits are also "classes" internally, and yet they are not returned. We make a distinction in userland, and this should be followed by the provided functions.
From my userland developer mental model PoV enums are just special classes. Leaving aside Reflection or other introspection functionality and enum object behaves just like a "regular" class object. The same is not true for interfaces and traits, which are structures that help you build a class (including enum classes, which support both interfaces and traits). Best regards Tim Düsterhus

« previous php.internals (#125746) next »