Re: [RFC][DISCUSSION] Object type hint
| From: | Stanislav Malyshev | Date: | Mon, 24 Oct 2016 05:05:14 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Object type hint | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96570@lists.php.net to get a copy of this message | ||
Hi!
> In the same way that Iterable type hint allows you to safely do a
> foreach on an argument, object allows you to safely use property
> accessor syntax (i.e. ->). For me it would be most useful in lower
> level utility classes.
Not sure I get this point. How you can safely use -> if you have no idea
what object you've got? You certainly don't expect every object to have
the same properties?
--
Stas Malyshev
smalyshev@gmail.com