Re: [RFC] Nullable and non-nullable cast operators

From: Date: Fri, 24 Oct 2025 12:43:50 +0000
Subject: Re: [RFC] Nullable and non-nullable cast operators
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-128952@lists.php.net to get a copy of this message
Hi Lynn,

>  - In the RFC the "Behavior Comparison Table" the colors make it hard to read
> what's listed in the table, could this be adjusted?

Unfortunately this is the default style rendered by the PHP website.
But I can see if plain text could help readability. Let me check.

> // would be nice if it incorporated an "isset check" as it's effectively treated
> as a null value
> $quantity = ((?int) $_POST['quantity']) ?? 0;

I understand that it would probably help, but we prefer to keep this
proposition consistent with the current coercion rules of the core and
avoid adding more special rules to the numerous existing ones.

— Alexandre Daubois


Thread (18 messages)

« previous php.internals (#128952) next »