Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57127 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64181 invoked from network); 27 Dec 2011 16:00:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Dec 2011 16:00:39 -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:52179] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/11-58465-5ABE9FE4 for ; Tue, 27 Dec 2011 11:00:38 -0500 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 4A674DE13D; Tue, 27 Dec 2011 16:00:35 +0000 (GMT) Date: Tue, 27 Dec 2011 16:00:35 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Stas Malyshev cc: PHP Internals In-Reply-To: <4EF7C0EC.8070807@sugarcrm.com> Message-ID: References: <4EF7C0EC.8070807@sugarcrm.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: bug 52062 From: derick@php.net (Derick Rethans) On Sun, 25 Dec 2011, Stas Malyshev wrote: > I see that test for bug 52062 (marked as fixed by this commit: > http://svn.php.net/viewvc/?view=revision&revision=320481) now fails on my > 32-bit system. Looking at the patch and the test, it can not actually succeed, > as the test expects this: > int(100000000000) > which is not possible on 32-bit system, and the code actually compares the > result to LONG_MAX which is 32-bit and returns false when it's bigger that > that. So I'd like to know what was the intent there: > > 1. Return false on 32-bit and the test should be fixed to account for 32-bit > and 64-bit? > 2. Return float on 32-bit? > 3. Do something else? > > Please advise. There are several issues here: 1. The test was wrong, the result for var_dump($d->getTimestamp()); should indeed have been bool: false; I've a patch for this. 2. DateInterval::format() didn't handle large ints succesfully; I have a patch for this too. 3. $d->setTimestamp(100000000000) is not ever going to work as zend_parse_parameters simply gives me long: 1215752192. This I find really strange actually. Any clue? cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug