Re: [PHP-DEV] Closures serialization

2009-01-04 Thread Johannes Schlüter
On Sat, 2009-01-03 at 14:12 +0100, Marcin Kurzyna wrote: as you said it's saving the zend_function member that is tricky. i thought i'd go with saving function string and recompiling it as you suggested (i don't want to mess with APC although i find the idea of opcode serialization much

Re: [PHP-DEV] [RFC] Re: [PHP-DEV] __invoke() weirdness

2009-01-04 Thread Johannes Schlüter
Hi, On Sat, 2009-01-03 at 15:47 +0100, Marcus Boerger wrote: I'd say it would be good to concentrate on making 5.3 stable and then see how new features are accepted. If users really demand such a functionality, when using closures for real life development, we can still add it, but that

Re: [PHP-DEV] [PATCH] Bug #46806 - mb_strimwidth

2009-01-04 Thread Moriyoshi Koizumi
Hi, This behavior seems strange, but the rationale of this function is that the (east asian) width of the resulting string does not exceed the specified value so that it would fit to a fixed sized box when rendered in the browser, assuming the string would be displayed with a monospace font.

Re: [PHP-DEV] [RFC] Closures, Lambdas and use

2009-01-04 Thread Sebastian Bergmann
Marcus Boerger schrieb: $f = function() { use $x; } +1 for consistency. -- Sebastian Bergmann http://sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] [RFC] Closures, Lambdas and use

2009-01-04 Thread Larry Garfield
On Sunday 04 January 2009 8:17:27 pm Marcus Boerger wrote: Hello Larry, $f = function() use ($y, $z) { global $x; // By reference } $y is clearly by value, and $z clearly by reference, as that parallels the way function parameters work right next to the lexical variables.

Re: [PHP-DEV] [RFC] Closures, Lambdas and use

2009-01-04 Thread Stanislav Malyshev
Hi! some time back (August 08) I complained about 'use' being at a weird position and not at the same place as 'global' or 'static' where I expected it. Back then Dmitry asked me to provide a patch to check out the alternative. Now during the holidays I finally found some time to change from: