Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39269 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64771 invoked from network); 24 Jul 2008 14:36:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2008 14:36:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=chris_se@gmx.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chris_se@gmx.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.net designates 213.165.64.20 as permitted sender) X-PHP-List-Original-Sender: chris_se@gmx.net X-Host-Fingerprint: 213.165.64.20 mail.gmx.net Received: from [213.165.64.20] ([213.165.64.20:46302] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/D5-44225-27398884 for ; Thu, 24 Jul 2008 10:36:35 -0400 Received: (qmail invoked by alias); 24 Jul 2008 14:36:31 -0000 Received: from p54A17F89.dip.t-dialin.net (EHLO chris-se.dyndns.org) [84.161.127.137] by mail.gmx.net (mp026) with SMTP; 24 Jul 2008 16:36:31 +0200 X-Authenticated: #186999 X-Provags-ID: V01U2FsdGVkX18MPcteWukMufd+Kl71mlAQs7zGC0LWsUJ2eOUWaK krtuW7acp8EYZz Received: from [192.168.100.13] (cobalt.seiler.lan [192.168.100.13]) by chris-se.dyndns.org (Postfix) with ESMTP id 7729C19446; Thu, 24 Jul 2008 16:03:38 +0200 (CEST) Message-ID: <4888931D.6080405@gmx.net> Date: Thu, 24 Jul 2008 16:35:09 +0200 User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: Jack Steadman CC: internals@lists.php.net References: <7AFF263C3DBE2549899F71BB925794FF0492A863@sullivan.smartertravelmedia.com> <48884251.1020300@gmx.net> <7AFF263C3DBE2549899F71BB925794FF0492A865@sullivan.smartertravelmedia.com> In-Reply-To: <7AFF263C3DBE2549899F71BB925794FF0492A865@sullivan.smartertravelmedia.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.61 Subject: Re: [PHP-DEV] question about backward-compatibility break/bug in php 5.2.6 From: chris_se@gmx.net (Christian Seiler) Hi! > This 64-bit machine is running 5.2.5 and returns false on the all-zero > datetime string. It was upgraded last week to 5.2.6 and started > returning the large negative integer. Ah, yes, the change responsible is the following: It fixes bug #44209 . timelib.h didn't include limits.h and thus always defined LONG_MAX / LONG_MIN to the 32bit values for longs and thus the check in timelib.c for LONG_MIN failed in 5.2.5 for your timestamp. But as 5.2.6 fixed that (LONG_MIN from limits.h used when present), your timestamp became valid and strtotime() returned it. Or to put it that way: The current behaviour of PHP 5.2.6 is the expected behaviour (at least what reading the source tells about the author's intentions) and it was broken before. As to whether it's a good idea that strtotime() accepts invalid dates, I'll stay out of that discussion. Regards, Christian