Re: [RFC] Anonymous Classes
| From: | Stanislav Malyshev | Date: | Fri, 06 Mar 2015 23:42:33 +0000 |
| Subject: | Re: [RFC] Anonymous Classes | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-84391@lists.php.net to get a copy of this message | ||
Hi!
> Right, this here RFC has been drastically improved.
>
> https://wiki.php.net/rfc/anonymous_classes
>
> Anyone got any doubts or troubles at this point?
>
> It's about 5 days until the vote starts.
Couple of points to clarify:
1. Is the new syntax "new class ..." or just "class ..." and new works
the same? I.e. could you do:
$foo = class extends Callback { ... }
$bar = new $foo;
2. What is the scope of the anonymous class? Can it get access to
parent's variable scope? Private functions?
--
Stas Malyshev
smalyshev@gmail.com