Stanislav, On Fri, Mar 6, 2015 at 6:42 PM, Stanislav Malyshev <smalys...@gmail.com> wrote: > Hi! > 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;
Nope, none of that. Wrap that in a function or clone it perhaps. > 2. What is the scope of the anonymous class? Can it get access to > parent's variable scope? Private functions? Works the same as any named class. No new special rules here. Play around on 3v4l and show me an example of something you don't like, or make sure it works the way you expect. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php