Hey all,

I poked around a bit in the Enum RFCs and I could find (maybe I missed) what's 
up with this:
enum Foo:string implements \Stringable
{
case FOO = 'bar';

public function __toString() {
return $this->value;
}
}

PHP Fatal error: Enum Foo cannot include magic method __toString
It seems to me that when the enum is a string it is entirely reasonable to 
expect __toString() to work here and support the \Stringable interface.
Is there a reason I'm missing as to why this is problematic in the engine 
that's been documented somewhere, or is this an oversight we can look at 
correcting?
John

Reply via email to