Re: [PHP-DEV] [PATCH] [RFC] Closures and lambda functions in PHP
by Marcus Boerger other posts by this author
Jul 5 2008 12:48PM messages near this date
Re: [PHP-DEV] [PATCH] [RFC] Closures and lambda functions in PHP
|
Re: [PHP-DEV] [PATCH] [RFC] Closures and lambda functions in PHP
Hello Stanislav,
Monday, June 30, 2008, 12:20:15 AM, you wrote:
> Hi!
> > * Class::__invoke() to allow functors[1]. The class "Closure" in
> > your proposal should also implement that method to make
> > method_exists() and ext/reflection behave.
> > * Change the behaviour how method calls are resolved. Method calls
> > on invokable objects (closures or functors) should work.
> And to close the circle, add __invoke to ReflectionFunctionAbstract and
> implement it in Reflectionfunctiom and ReflectionMethod (here we might
> have trouble with specifying object, so need to do some thinking on it -
> maybe we'll need another class or augment ReflectionMethod somehow?)
Actually a pretty good idea :-) Callable comes to mind if we really need
more names. But a ReflectionMethod could be a static method as well as a
static closure. So I think it should throw an exception in case an
instance is missing, just as it would do for non static methods.
marcus
> > echo $view->escape("<script>alert(1)</script>");
> If we use this syntax, and $view->escape is not defined, should we call
> __call or __get?
> --
> Stanislav Malyshev, Zend Software Architect
> stas@[...].com http://www.zend.com/
> (408)253-8829 MSN: stas@[...].com
Best regards,
Marcus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Christian Seiler
Wez Furlong
Dmitry Stogov
Stanislav Malyshev
Alexander Wagner
Dmitry Stogov
Andi Gutmans
Christian Seiler
Lukas Kahwe Smith
Sebastian Bergmann
Marcus Boerger
Markus Fischer
Troels Knak-Nielsen
Christian Seiler
Dmitry Stogov
Larry Garfield
Christian Seiler
Dmitry Stogov
Christian Seiler
Lars Strojny
Stanislav Malyshev
Marcus Boerger
Lars Strojny
Troels Knak-Nielsen
Larry Garfield
Marcus Boerger
Dmitry Stogov
Andi Gutmans
Alexander Wagner
Andi Gutmans
Alexander Wagner
Alexander Wagner
Christian Seiler
Alexander Wagner
Lars Strojny
Dmitry Stogov
Marcus Boerger
Lars Strojny
Dmitry Stogov
Alexey Zakhlestin
Federico Lebron
Dmitry Stogov
Rodrigo Saboya
lenar
Larry Garfield
Stanislav Malyshev
Marcus Boerger
Alexander Wagner
Lars Strojny
Larry Garfield
Robert Cummings
Rodrigo Saboya
Alexander Wagner
Christian Seiler
Chris Stockton
Alexander Wagner
Troels Knak-Nielsen
Andi Gutmans
Marcus Boerger
Christian Seiler
Lukas Kahwe Smith
Gwynne Raskind
Andi Gutmans
Christian Seiler
Stanislav Malyshev
Kalle Sommer Nielsen
Troels Knak-Nielsen
Lars Strojny
Alexander Wagner
Stanislav Malyshev
Alexander Wagner
Andi Gutmans
Marcus Boerger
Kalle Sommer Nielsen
Troels Knak-Nielsen
Stanislav Malyshev
Alexey Zakhlestin
Chris Stockton
Alexey Zakhlestin
Gwynne Raskind
Stanislav Malyshev
Christian Seiler
Gwynne Raskind
Stanislav Malyshev
Richard Quadling
Christopher Jones
Marcus Boerger
Steph Fox
Christian Seiler
Marcus Boerger
Stanislav Malyshev
Lars Strojny
Christian Seiler
Stanislav Malyshev
Marcus Boerger
Marcus Boerger
Andrei Zmievski
Stanislav Malyshev
Stanislav Malyshev
Alexey Zakhlestin
Chris Stockton
Christian Seiler
Christian Seiler
Larry Garfield
Edward Z. Yang
Christian Seiler
Larry Garfield
Christian Seiler
Nathan Nobbe
Christian Seiler
Alexey Zakhlestin
Larry Garfield
Philip Olson
|