On Dec 23, 2007 2:23 AM, Christian Seiler <[EMAIL PROTECTED]> wrote:
> First of all: I don't quite understand what you mean when you want to
> serialize a function (closure or not)? The opcodes? Ok, sure, with the
> current PHP implementation you can serialize the variable used to CALL
> the function (e.g. with $func = 'str_replace'; $func is only a string

Admittedly, I got the idea, in relation to Wez' patch. There, it would
be trivial to serialize/unserialize the function pointer. I suppose
that isn't immediately possible, if the closure is a resource type.

> and can be serialized). But where would you need that? (Ok, for normal
> functions that are named this could actually be useful, but for
> anonymous functions?)

If a closure could be serialized, it would allow for continuation
style applications. I'm not sure, how good idea this is in web
applications anyway, so just ignore that.

Just a minor note; The semi-colon after the closing brace, seems
superfluous. Is there any reason for it?

Otherwise excellent work there.

-- 
troels

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to