Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68312 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72791 invoked from network); 25 Jul 2013 23:01:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2013 23:01:41 -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 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:51400] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/79-05798-45EA1F15 for ; Thu, 25 Jul 2013 19:01:41 -0400 Received: from [192.168.2.20] (ppp-93-104-18-167.dynamic.mnet-online.de [93.104.18.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 3837765E4F; Fri, 26 Jul 2013 01:01:36 +0200 (CEST) To: Jakub Zelenka Cc: Stas Malyshev , Nikita Popov , PHP internals list , "nikic@php.net" In-Reply-To: References: <51F177E7.3020103@sugarcrm.com> <51F182D2.7030007@sugarcrm.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 26 Jul 2013 01:01:18 +0200 Message-ID: <1374793278.3605.1436.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] New handler for retrieving properties when object is serialized From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Thu, 2013-07-25 at 21:01 +0100, Jakub Zelenka wrote: > On Thu, Jul 25, 2013 at 8:56 PM, Stas Malyshev wrote: > > > > You can create those properties when processing __sleep. Nothing > > requires them to exist before __sleep was called. > > > > > The problem is that properties will exist after __sleep was called. :) > There are situations that you don't want them to exist (for example > DateTime). What about using our Serializable interface? - That was invented to serialize internal objects with arbitrary internal data. johannes