Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20019 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54212 invoked by uid 1010); 15 Nov 2005 17:29:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54197 invoked from network); 15 Nov 2005 17:29:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2005 17:29:50 -0000 X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.4/2.6 Received: from ([204.11.219.139:53003] helo=colo.lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B1/F5-07637-D0B1A734 for ; Tue, 15 Nov 2005 12:29:50 -0500 Received: from [207.126.233.18] (rasmus2.corp.yahoo.com [207.126.233.18]) (authenticated bits=0) by colo.lerdorf.com (8.13.5/8.13.5/Debian-3) with ESMTP id jAFHTU3K001793 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 15 Nov 2005 09:29:31 -0800 Message-ID: <437A1AF9.3030200@lerdorf.com> Date: Tue, 15 Nov 2005 09:29:29 -0800 User-Agent: Thunderbird 1.5 (Macintosh/20051025) MIME-Version: 1.0 To: pierre.php@gmail.com CC: internals@lists.php.net References: <437A0D24.6030701@caedmon.net> <20051115181307.18c2b27b@localhost.localdomain> <437A1820.8060902@lerdorf.com> <20051115181957.06d0f14e@localhost.localdomain> In-Reply-To: <20051115181957.06d0f14e@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] date() behaviour changed in 5.1? From: rasmus@lerdorf.com (Rasmus Lerdorf) Pierre wrote: > On Tue, 15 Nov 2005 09:17:20 -0800 > rasmus@lerdorf.com (Rasmus Lerdorf) wrote: > >> Pierre wrote: >>> On Tue, 15 Nov 2005 18:59:32 +0200 (EET) >>> sniper@iki.fi (Jani Taskinen) wrote: >>> >>>> If you pass bad data to a function, it should not warn you? >>>> I'd rather have it as a FATAL error. :) >>>> >>>> Nothing to fix here, move along. (and fix your code..) >>> PHP is losely typed, I see nothing wrong to pass an integer as >>> string there (for example, imagecreate("100", "100"); works). >> The question isn't what to do with "100","100" but what to do with >> "100abc","100abc". Should that still work? The old >> zend_get_parameters() following by a convert_to_long() says Yes. The >> newer zend_parse_parameters() says no. > > My answer was to Jani's. I realize that, but Jani said "bad data" not data of the wrong type. Your example didn't have any bad data. You just had "100" which is a perfectly valid numeric string and will work in all cases. -Rasmus