Re:Union Types have been accepted for PHP 8
by chx on Saturday November 09, 2019 @01:21PM
(#21493200)
Objects are enforced and a simple declaration can make PHP enforce the scalars as well. https://3v4l.org/6UU2v https://3v4l.org/q1PAq In PHP 7.4 due in a few weeks covariant return types / contravariant arguments will arrive. https://stitcher.io/blog/new-in-php-74#improved-type-varianc...
[ Parent
| on HN ]