On 7/16/2010 22:57, John Campbell wrote:
On Fri, Jul 16, 2010 at 10:21 PM, David Krings<[email protected]>  wrote:
Uhm, for the ones like me who have no clue what this means, any pointers
available that explain closures?

You can read about closures until you are blue in the face.  The first
thing you have to grock is first-class functions.  Which basically
means a variable can be a function.  We normally think of variables as
"data", but there is no reason you can't store a procedure in a
variable.  Once you understand that functions are just another type of
variable, then you can write functions that create other functions.
e.g. you can return a function from a function.  The following code
illustrates the concept, and is valid php 5.3

Ah, thanks for the hint. I know understand Hans' questions as well, such as why the heck would one want to use that? Then again, why not. Not using it is also valid php 5.3.

David
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to