Re: [RFC] [Discussion] Literal Scalar Types
| From: | Seifeddine Gmati | Date: | Thu, 23 Jul 2026 05:13:57 +0000 |
| Subject: | Re: [RFC] [Discussion] Literal Scalar Types | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-132086@lists.php.net to get a copy of this message | ||
Subject: Re: [RFC] Literal Scalar Types
On Mon, 15 Jun 2026 at 02:22, Seifeddine Gmati <azjezz@carthage.software>
wrote:
> Hello Internals,
>
> I'd like to start the discussion on a new RFC adding literal scalar
> types to PHP.
>
> - RFC: https://wiki.php.net/rfc/literal_scalar_types
> - Implementation: https://github.com/php/php-src/pull/22314
>
> Thanks,
> Seifeddine.
>
Hi internals,
I have updated the Literal Scalar Types RFC to version 1.0, which I
consider the final revision: https://wiki.php.net/rfc/literal_scalar_types
The changes are editorial, based on feedback in this thread. I merged the
"Accepted literal syntax" section into the per-type sections so each
literal kind is described in one place, added a paragraph to the
introduction on where literal types fit next to enums, tightened the
reasoning in the matching semantics section, and added a short note on enum
comparisons to the Performance section. The proposal itself is unchanged:
the syntax, the semantics and the three votes are the same as in 0.3.
Since this is a minor revision, I am opening voting shortly. A separate
[VOTE] thread will follow.
Thanks to everyone who took part in the discussion.
Seifeddine