Re: [Early Feedback] Pattern matching

From: Date: Thu, 27 Jun 2024 04:47:30 +0000
Subject: Re: [Early Feedback] Pattern matching
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 2024-06-27 12:41, Chuck Adams wrote:

There’s some difference though
     [] is [?’foo’ => $x is string]              // matches, $x === null
Except null is not a string.
There’s a precedent with function parameters:
     function foo(string $bar = null) // $bar is string|null
which has already been voted for deprecation in 8.4: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

Thread (79 messages)

« previous php.internals (#123922) next »