Re: [RFC] Enumerations, Round 2
From: Markus Fischer Date: Wed, 30 Dec 2020 08:43:33 +0000 Subject: Re: [RFC] Enumerations, Round 2 References: 1 Groups: php.internals Request: Send a blank email to internals+get-112655@lists.php.net to get a copy of this message
Hi, On 28.12.20 21:21, Larry Garfield wrote:The full RFC is here, and I recommend reading it again in full given how much was updated. https://wiki.php.net/rfc/enumerationsI tried to answer the following question but failed to do so: What is the scalar value for a ScalarEnum if none is explicitly defined? The RFC makes this example:enum Suit: string implements Colorful { case Hearts = 'H'; case Diamonds = 'D'; …'D' == Suit::Diamonds->value; // trueWhat in this case?enum Suit: string { case Hearts; case Diamonds; …What is the outcome ofSuit::Diamonds->value? Thanks! - Markus
Thread (52 messages)
| « previous | php.internals (#112655) | next » |
|---|