The reason is probably that return types are currently invariant, so a
inheriting class would have to declare the parent as return type anyway.
Lee Davis schrieb am Di., 1. März 2016 12:46:
> Hi Internals,
>
> whilst recently playing with return type hints on PHP 7 I
Hi Internals,
whilst recently playing with return type hints on PHP 7 I noticed that
"static" cannot be used as a valid return type. I'm not entirely sure
whether this has been purposely prevented or not.
https://3v4l.org/LEXis
The behaviour works it's just a parse error that's stopping it.