Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42469 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1203 invoked from network); 4 Jan 2009 13:35:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2009 13:35:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 83.243.58.133 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 83.243.58.133 mailout1.netbeat.de Linux 2.6 Received: from [83.243.58.133] ([83.243.58.133:42404] helo=mailout1.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/F3-07052-53BB0694 for ; Sun, 04 Jan 2009 08:35:51 -0500 Received: (qmail 25618 invoked by uid 89); 4 Jan 2009 13:45:14 -0000 Received: from unknown (HELO ?192.168.1.102?) (johannes%schlueters.de@93.104.112.98) by mailout1.netbeat.de with ESMTPA; 4 Jan 2009 13:45:14 -0000 To: Marcin Kurzyna Cc: internals@lists.php.net, Marcus Boerger In-Reply-To: <495F6457.6060201@crystalpoint.pl> References: <87.E1.28540.1817E594@pb1.pair.com> <1811359335.20090102211222@marcus-boerger.de> <495F6457.6060201@crystalpoint.pl> Content-Type: text/plain Date: Sun, 04 Jan 2009 14:35:39 +0100 Message-ID: <1231076139.6023.9.camel@goldfinger> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Closures serialization From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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 more appealing). anyway it's proving itself, > well... tricky ;-) Two thoughts: - It can be quite tricky to keep the binding of "use"d variables correct - Serialized data soften used as data exchange format (for instance ) the default unserialize shouldn't introduce executable code even though it's not executed by default we should be careful there. And yes, I can understand the need to serialize object structures, including closures, to sessions... johannes