Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57134 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80538 invoked from network); 27 Dec 2011 18:12:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Dec 2011 18:12:29 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:50454] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/60-10976-A8A0AFE4 for ; Tue, 27 Dec 2011 13:12:27 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id EC5117000433; Tue, 27 Dec 2011 18:12:23 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id OJAZZFWOeXRk; Tue, 27 Dec 2011 18:12:23 +0000 (WET) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id A8CBD7000436; Tue, 27 Dec 2011 18:12:23 +0000 (WET) Received: from damnation (5ED2BD93.cm-7-3c.dynamic.ziggo.nl [94.210.189.147]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 05F172007074; Tue, 27 Dec 2011 18:12:22 +0000 (WET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Derick Rethans" Cc: "PHP Developers Mailing List" References: <4EF7C0EC.8070807@sugarcrm.com> <254a46ca-7671-4e38-8fbf-a70dffce2196@email.android.com> <4EF836B7.4070506@daylessday.org> Date: Tue, 27 Dec 2011 19:12:00 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/11.60 (Win32) Subject: Re: [PHP-DEV] bug 52062 From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") Hi On Tue, 27 Dec 2011 13:26:59 +0100, Derick Rethans wrote: > On Mon, 26 Dec 2011, Antony Dovgal wrote: > >> On 12/26/2011 12:40 PM, Derick Rethans wrote: >> >> > I'll have a look when I get back home. Is there anything else you >> > want me to look at? >> >> Yes! >> https://bugs.php.net/bug.php?id=53437 =) > > I've just had a look at the patch, and it seems to encode things in > weird stuff for DatePeriod (packed ints, base64)?!. Not for DatePeriod, for DateInterval. The problem is that the DateInterval object uses 64-bit integers in its structure, and you can't serialize them as normal PHP integers if you want to have no data corruption in architectures with 32-bit longs like Windows. You seemed to have ignored that difficulty when you later implemented DateInterval serialization. My implementation also does state validation on DateInterval::__wakeup. > It also seems to re-implement the DateInterval serialisation and the > patch doesn't cleanly apply. > Well, the patch is against r305891 (HEAD at the time), DateInterval serialization was implemented in r320481. In any case, if you want to use only the DatePeriod part (which provides serialization and properties), it should work independently from the DateInterval portion. -- Gustavo Lopes