Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20004 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92161 invoked by uid 1010); 15 Nov 2005 16:28:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92146 invoked from network); 15 Nov 2005 16:28:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2005 16:28:33 -0000 X-Host-Fingerprint: 69.60.120.90 iconoclast.caedmon.net Linux 2.4/2.6 Received: from ([69.60.120.90:43389] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 46/9B-07637-1BC0A734 for ; Tue, 15 Nov 2005 11:28:33 -0500 Received: from localhost ([127.0.0.1]) by iconoclast.caedmon.net with esmtp (Exim 3.35 #1 (Debian)) id 1Ec3eR-00069W-00 for ; Tue, 15 Nov 2005 11:27:19 -0500 Message-ID: <437A0D24.6030701@caedmon.net> Date: Tue, 15 Nov 2005 11:30:28 -0500 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: date() behaviour changed in 5.1? From: sean@caedmon.net (Sean Coates) I discussed this with Rasmus and Derick, yesterday, but I don't think we came to a conclusion.. Is this a bug, or intended behaviour? sean@iconoclast:~$ /opt/src/php-5.0.4/sapi/cli/php -r 'echo date("r", "1132003418 ") ."\n";' Mon, 14 Nov 2005 16:23:38 -0500 sean@iconoclast:~$ /opt/src/php5-200511131530/sapi/cli/php -r 'echo date("r", "1132003418 ") ."\n";' Warning: date() expects parameter 2 to be long, string given in Command line code on line 1 sean@iconoclast:~$ The conclusion SEEMED to be that it's a bug in the parameter parsing API (as date() now uses the new API). I think that the 2nd param should automatically be cast to an int. Yes, I realize that the documentation says it should be an int, and I'm ok with that (the extraneous whitespace is my fault). I think it should be mentioned in the release docs if it won't be fixed, though. Also, a warning is pretty harsh. A E_NOTICE is more representative of what's happening. Also, in the E_WARNING scenario above, date() no longer returns the expected result (based on <=5.0 code). So: is this a bug? If so, I can send a report -- I just didn't want it to get bogussed without discussion. If not -- I really think this should be fixed before 5.1.. I realize it's very late in the game, though. Opinions? S