Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57084 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66041 invoked from network); 24 Dec 2011 14:47:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Dec 2011 14:47:43 -0000 Authentication-Results: pb1.pair.com header.from=ar@ez.no; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ar@ez.no; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ez.no from 209.85.210.42 cause and error) X-PHP-List-Original-Sender: ar@ez.no X-Host-Fingerprint: 209.85.210.42 mail-pz0-f42.google.com Received: from [209.85.210.42] ([209.85.210.42:41892] helo=mail-pz0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/4C-16446-E06E5FE4 for ; Sat, 24 Dec 2011 09:47:43 -0500 Received: by dadp13 with SMTP id p13so8750886dad.29 for ; Sat, 24 Dec 2011 06:47:39 -0800 (PST) Received: by 10.68.189.163 with SMTP id gj3mr40314551pbc.86.1324738059152; Sat, 24 Dec 2011 06:47:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.2.233 with HTTP; Sat, 24 Dec 2011 06:47:18 -0800 (PST) In-Reply-To: References: Date: Sat, 24 Dec 2011 15:47:18 +0100 Message-ID: To: Derick Rethans Cc: Pierre Joye , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=e89a8ff1ccd26fabf304b4d79d27 Subject: Re: [PHP-DEV] REQUEST_TIME change in PHP 5.4 From: ar@ez.no (=?UTF-8?B?QW5kcsOpIFLDuG1ja2U=?=) --e89a8ff1ccd26fabf304b4d79d27 Content-Type: text/plain; charset=UTF-8 On Sat, Dec 24, 2011 at 12:55 PM, Derick Rethans wrote: > On Sat, 24 Dec 2011, Pierre Joye wrote: > > > hm, I should read better... > > > > "The REQUEST_TIME value inside server now returns a floating point > number" > > > > How does it break BC except if one is doing a strong type test? which > > makes very little sense in this case. > > > > While a fix is easy, (int) casting and works with all previous > > versions, I would like to know how it breaks apps out there. > > new DateTime("@{$_SERVER['REQUEST_TIME']}"); f.e. > > Yes, this is the one from Zeta Components MvcTools. In eZ Publish it was db based session gc using REQUEST_TIME and compatibility for potential extensions that might have used this variable via eZ Publish api: https://github.com/ezsystems/ezpublish/commit/3483c623769aa9ed3be7b6f33e3579cf8a8efd45 In both cases a (int) was added in front of the variable to make sure it still behaves the same, so not a big deal. But as also mentioned, changes like this requires patching to be compatible with 5.4. So unless this is done to be inline with some standard on such a server variable, I would suggest placing microtime on a separate server variable (since it is indeed useful to have it for time accumulators and performance metrics). --e89a8ff1ccd26fabf304b4d79d27--