RE: [PHP-DEV] Scalar Type Hints v0.4
| From: | François Laupretre | Date: | Wed, 18 Feb 2015 15:26:50 +0000 |
| Subject: | RE: [PHP-DEV] Scalar Type Hints v0.4 | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83083@lists.php.net to get a copy of this message | ||
> De : Lazare Inepologlou [mailto:linepogl@gmail.com]
>
> So, yes it would be nice null not to be included in scalars. Instead, we
> could have a union type like scalar? = scalar|null
That's roughly the idea. However, IMO, the general mechanism for union types needs to be
defined before we start defining union type aliases.
Another option is to create new ZPP types. These won't be union type aliases, technically, but
can be defined now. From an user's point of view, the usages would be roughly the same, and we
can propose them for 7.0.
Regards
François