> On Oct 4, 2020, at 4:08 PM, Rowan Tommins wrote:
>
> Hi Nuno,
>
> On 03/10/2020 22:09, Nuno Maduro wrote:
>> A few days ago I opened a pull request that adds support for multi-line
>> arrow functions in PHP: https://github.com/php/php-src/pull/6246.
>
>
> Welcome to the list. Firstly, it's p
Yeah, kind of, the problem with enums from what I understood from the
current RFCs is that you'll need extra code to map a scalar to that
specific enum value.
Besides that, a literal type implementation is afaik simpler to
implement/spec than enums, thus having a better chance to pass voting.
On
пн, 5 окт. 2020 г., 02:38 Bogdan Ungureanu :
>
> function getStatus(): "draft" | "published" { }
>
It sounds that what you're really asking for is enums, e.g.
enum Status {
Draft,
Published
};
function getStatus(): Status { ... }
>
Hello internals,
Since union types have landed in PHP, this allows us the possibility to
have literal types support as well and I would like to hear your
thoughts about an RFC for it.
I think a feature like this would greatly improve the way we model our code
in very common use cases. For example
Hi Nuno,
On 03/10/2020 22:09, Nuno Maduro wrote:
A few days ago I opened a pull request that adds support for multi-line
arrow functions in PHP: https://github.com/php/php-src/pull/6246.
Welcome to the list. Firstly, it's probably worth having a look in the
mailing list archives for prior di