Re: [RFC][DISCUSSION] Object type hint
| From: | Markus Fischer | Date: | Mon, 24 Oct 2016 07:19:39 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Object type hint | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96582@lists.php.net to get a copy of this message | ||
Hi,
On 23.10.16 09:39, Michał Brzuchalski wrote:
> I would like to initiate discussion for Object typehint RFC
> https://wiki.php.net/rfc/object-typehint
>
> This feature is developed to provide missing functionality which is needed
> and quite easy to introduce.
> There are many people which I've talked about the benefits of this
> functionality.
I just wished a few weeks ago I was able to typehint that. Actually I
even tried just to lern it doesn't work.
It's a unit test helper method to make a method on an object public,
signature:
protected function makeMethodPublic(object $obj, string $methodName):
ReflectionMethod
So, I can come up with exactly one (to me) useful case, but it's
arguable not "that important" and I certainly wouldn't and didn't add an
is_object check for this, so there goes my priority for it.
thanks,
- Marus