[PHP-DEV] Re: [RFC] Static return type

2020-01-08 Thread Mark Randall

On 08/01/2020 11:42, Nikita Popov wrote:

Hi internals,

I would like to propose the following RFC, which allows using "static" as a
return type:

https://wiki.php.net/rfc/static_return_type


So many "@return $this" docblocks are going to be deleted as a result of 
this when PHP8 lands.


+1 from me.

--
Mark Randall
marand...@php.net

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [RFC] Static return type

2020-01-27 Thread Nikita Popov
On Wed, Jan 8, 2020 at 12:42 PM Nikita Popov  wrote:

> Hi internals,
>
> I would like to propose the following RFC, which allows using "static" as
> a return type:
>
> https://wiki.php.net/rfc/static_return_type
>
> While I'm personally not a fan of late static binding, we do support it
> and people do use it quite heavily, so I think we should also support it in
> return types.
>
> Regards,
> Nikita
>

Heads up: I plan to start voting on this RFC tomorrow.

I think most of the discussion here has been around the "$this" type
mentioned in future scope, but no particular concerns with "static" itself
have been raised. (I don't plan to include $this as part of this RFC.)

Regards,
Nikita