Hi

Am 2026-06-30 18:14, schrieb Seifeddine Gmati:
1. The RFC specifies "Integer literals, with an optional leading minus
sign: 1, 0, -1.", are leading `+` signs also legal? What about multiple
signs or spaces?

A single leading unary `+` or `-` is accepted, so both `-1` and `+1` are
legal, and `+1` denotes the same type as `1`.

I was confused for a bit, because you didn't adjust the quoted section (https://wiki.php.net/rfc/literal_scalar_types#integer_literals) and instead only adjusted the “Accepted literal syntax” section, which is misleading / makes the RFC internally inconsistent. It probably makes sense to merge the “Accepted literal syntax” section into the three sections above as appropriate.

I'm also concerned about folks shooting themselves in the foot with type
checking performance for "wide unions of literal types". It might make
sense to provide a dedicated performance section in the RFC.

Added.

Thanks that looks good to me.

-------

Except for the remark about the literal syntax above, I don't have any further comments to the RFC (text).

Best regards
Tim Düsterhus

Reply via email to