Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66573 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65895 invoked from network); 10 Mar 2013 22:11:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Mar 2013 22:11:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:38284] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/B2-46845-1050D315 for ; Sun, 10 Mar 2013 17:11:14 -0500 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 161EADE13E; Sun, 10 Mar 2013 22:11:09 +0000 (GMT) Date: Sun, 10 Mar 2013 22:11:08 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Anatol Belski cc: Gustavo Lopes , internals@lists.php.net In-Reply-To: <1362869409.3221.77.camel@ghost> Message-ID: References: <1362869409.3221.77.camel@ghost> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-732013533-1362953470=:20747" Subject: Re: [PHP-DEV] Fix for bug #63437 From: derick@php.net (Derick Rethans) --8323329-732013533-1362953470=:20747 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 9 Mar 2013, Anatol Belski wrote: > On Sat, 2013-03-09 at 21:57 +0100, Gustavo Lopes wrote:=20 > > On Sat, 09 Mar 2013 21:36:41 +0100, Derick Rethans wro= te: > >=20 > > > On Tue, 5 Mar 2013, Anatol Belski wrote: > > > > > >> I've reworked the patch from=20 > > >> http://nebm.ist.utl.pt/~glopes/misc/date_period_interval_ser.diff=20 > > >> (mentioned by tony2001) for bug #63437, that seems to fix the=20 > > >> issue. That patch was ported back to 5.3 and adapted to the=20 > > >> current 5.4+. Both variants are posted to the ticket. > > > > > > Serializing this as a base64 encoded variant of some binary data=20 > > > is not a good thing. If you want to serialize, it needs to output=20 > > > the same thigns that allow users to create the period or interval. > >=20 > > I would agree in principle, but, as I explained before, there is a=20 > > problem. The DatePeriod class has 64-bit integers in its internal=20 > > structure. The PHP integer type cannot (in general) represent that=20 > > data. So the general method of getting the object data via=20 > > get_properties and serializing (and then using __set_state to=20 > > convert the array back) does not work unless you represent those=20 > > 64-bit integers with some non-integer type and do the conversions. > > So base64 seems to be only the doubtful point. Thriving to fix that,=20 > what if we could bring it in dependency of libgmp to serialize and=20 > read as strings (and maybe disable serialization otherwise)? Why do you need libgmp for that=E2=80=BD cheers, Derick --8323329-732013533-1362953470=:20747--