Hi Daniel
On Fri, Mar 13, 2026 at 1:06 AM Daniel Scherzer
<[email protected]> wrote:
>
> I'd like to start the discussion for a new RFC about removing the prohibition
> on __debugInfo() methods on enums.
>
> * RFC: https://wiki.php.net/rfc/debugable-enums
> * Implementation: https://github.com/php/php-src/pull/21425
The RFC currently only mentions:
> var_dump(Foo::Bar); // produces an array with "Bar is a case of the Foo enum"
But it would be good for it to spell out the full output for the
examples. From the implementation, I can see:
> object(Foo)#%d (1) {
> [0]=>
> string(14) "Foo::Bar = Baz"
> }
I think the enum(Foo::Bar) header should be preserved. If the user
wants to print some ancillary data for some reason, I wouldn't object
to that.
Ilija