Re: [Early Feedback] Pattern matching
| From: | Morgan | 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 internals+get-123922@lists.php.net to get a copy of this message | ||
On 2024-06-27 12:41, Chuck Adams wrote:
There’s some difference thoughExcept null is not a string.[] is [?’foo’ => $x is string] // matches, $x === null
There’s a precedent with function parameters:which has already been voted for deprecation in 8.4: https://wiki.php.net/rfc/deprecate-implicitly-nullable-typesfunction foo(string $bar = null) // $bar is string|null