Re: 5.4's New De-referencing plus assignment
| From: | Александр Москалёв | Date: | Thu, 01 Dec 2011 05:44:39 +0000 |
| Subject: | Re: 5.4's New De-referencing plus assignment | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56699@lists.php.net to get a copy of this message | ||
2011/11/30 Nikita Popov <nikita.ppv@googlemail.com>
> If we really want this kind of (expr)-> syntax, then it should really
> accept *any* expr. But I am not quite sure whether this will work out
> easily because in this case we can't be sue that expr is an object
> (but maybe it'll be simple, I just don't know).
>
Same as now worked: func()->something; or $a = 123; $a->makeMagic();
If $a or result of func not objects its throw error.
To all:
I think we can adding (expr)->methodOrNot , (expr)[expr] , (expr)(params)
and it combinations: (expr)[expr](params)->method etc.
Is it good or bad user chooses himself.
Maybe will be something like JQueryPHP :D
I think the only thing that can in principle prevent us - slowdown PHP.
With regards, Alexander Moskaliov
Irker@irker.net