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

From: Date: Sun, 06 Oct 2024 13:30:21 +0000
Subject: Re: [RFC] [Discussion] Add get_declared_enums() function
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-125758@lists.php.net to get a copy of this message
On Sun, Oct 6, 2024, at 2:25 AM, Juliette Reinders Folmer wrote: > I can imagine combining the alternative approach via > get_declared_symbols() with a new symbol_exists() function like you > suggest above (with a similar slow path to deprecate and remove the old > functions). > > On the plus side, the alternative approach makes for much more > versatile functionality. In a number of the cases I looked at, the > results from various get_declared_*() functions are combined before > further processing, so having a get-declared_symbols() function > would > allow for simplifying that code. The same can be said for the > *_exists() functions. FWIW, I'd love to have get_declared_symbols() and symbol_exists() functions, regardless of what we do with enums in particular. That's arguably a topic for another RFC, though. (And debatable if functions would count as symbols, but again, topic for another time.) --Larry Garfield

« previous php.internals (#125758) next »