Re: [PHP-DEV] Allowing static as a return type

2016-03-01 Thread Niklas Keller
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

[PHP-DEV] Allowing static as a return type

2016-03-01 Thread Lee Davis
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.