Re: Allow arbitrary expressions when using instanceof operator
| From: | Daniel Ribeiro | Date: | Sun, 09 Nov 2014 06:50:34 +0000 |
| Subject: | Re: Allow arbitrary expressions when using instanceof operator | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78854@lists.php.net to get a copy of this message | ||
On Fri, Nov 7, 2014 at 3:50 AM, Stas Malyshev <smalyshev@sugarcrm.com>
wrote:
> I find it very hard to accept this particular argument.
Honestly, I find it hard it too. The reason I started this is that I tried
to do something like $foo instanceof $bar->getClassName() and
I got a syntax error. It looks very straightforward and it should be the
expected behavior, except that it doesn't work. So this is the main
reason I started thinking about this: it's an improvement that aims
readability and easiness. Now, I'm sure you can agree with me that it's
way better than having a variable holding the class name.
---
Daniel Ribeiro
http://danielribeiro.org