From 95bf12373976bc8b716c6c3d2e5df7e0a91fa43f Mon Sep 17 00:00:00 2001 From: Claude Pache Date: Sat, 16 May 2026 01:06:56 +0200 Subject: [PATCH] lapsus: s/intersection/union/ with null An intersection of a type with `null` is semantically either `null` or `never` (depending on whether the type is nullable). But it is not allowed by PHP anyway. --- spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.md b/spec.md index ede3ef0..0de1e82 100644 --- a/spec.md +++ b/spec.md @@ -179,7 +179,7 @@ function veryComplex( If one of the ORed conditions is `null`, it MUST be the last item in the list. -An intersection of a single simple type with `null` SHOULD be abbreviated using the `?` alternate syntax: `?T`. +A union of a single simple type with `null` SHOULD be abbreviated using the `?` alternate syntax: `?T`. ### 2.6 Trailing commas