Re: [PHP-DEV] PATCH: Implementing closures in PHP

2007-12-23 Thread Christian Seiler
Hi! > Just a minor note; The semi-colon after the closing brace, seems > superfluous. Is there any reason for it? Unfortunately, yes. The problem is that the closure must be an expression so it can a) be assigned to a variable and b) returned directly. And since the expression is only a part of a

Re: [PHP-DEV] PATCH: Implementing closures in PHP

2007-12-23 Thread Christian Seiler
Hi David! > One question about the names you generate for the function table in > combination with opcode caches. [...] I now updated the patch so that this problem is addressed. You will find it here: http://www.christian-seiler.de/temp/closures-php-5-3-v2.patch The compiled functions are now

Re: [PHP-DEV] PATCH: Implementing closures in PHP

2007-12-23 Thread David Zülke
Cool. I hope I'll have the time to give that a shot over the holidays. Great work, nice patch (from what I, with my rubbish knowledge, can tell :D) David Am 23.12.2007 um 14:40 schrieb Christian Seiler: Hi David! One question about the names you generate for the function table in com

Re: [PHP-DEV] PATCH: Implementing closures in PHP (was: anonymous functions in PHP)

2007-12-23 Thread Martin Alterisio
2007/12/22, Christian Seiler <[EMAIL PROTECTED]>: > > Hi, > > I was following this thread and came upon Jeff's posting on how closures > could be implemented in PHP. > > Since I would find the feature to be EXTREMELY useful, I decided to > actually implement it more or less the way Jeff proposed. S