Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26169 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63169 invoked by uid 1010); 23 Oct 2006 08:16:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 63154 invoked from network); 23 Oct 2006 08:16:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2006 08:16:10 -0000 Authentication-Results: pb1.pair.com header.from=lsmith@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lsmith@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 212.112.227.169 cause and error) X-PHP-List-Original-Sender: lsmith@php.net X-Host-Fingerprint: 212.112.227.169 ipx11223.ipxserver.de Linux 2.5 (sometimes 2.4) (4) Received: from [212.112.227.169] ([212.112.227.169:52324] helo=ipx11223.ipxserver.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/92-41582-A4A7C354 for ; Mon, 23 Oct 2006 04:16:10 -0400 Received: from localhost (localhost [127.0.0.1]) by ipx11223.ipxserver.de (Postfix) with ESMTP id 9E89FDF01F9; Mon, 23 Oct 2006 10:16:07 +0200 (CEST) Received: from ipx11223.ipxserver.de ([127.0.0.1]) by localhost (flottensignalgeber [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15460-03; Mon, 23 Oct 2006 10:16:05 +0200 (CEST) Received: from [127.0.0.1] (i577B7A54.versanet.de [87.123.122.84]) by ipx11223.ipxserver.de (Postfix) with ESMTP id 25FA8DF01F7; Mon, 23 Oct 2006 10:16:05 +0200 (CEST) Message-ID: <453C7A0A.8050905@php.net> Date: Mon, 23 Oct 2006 10:15:06 +0200 Organization: PHP.net User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Derick Rethans Cc: Pierre , Ilia Alshanetsky , RQuadling@googlemail.com, php internals LIST References: <10845a340610221045x2439b02alee7829425c902468@mail.gmail.com> <1B060546-A982-497C-8241-680044CDED15@prohost.org> <453C7372.3070104@php.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by somedaemon at backendmedia.com Subject: Re: [PHP-DEV] Why is mktime(0,0,0,0,0,0) E_STRICT? From: lsmith@php.net (Lukas Kahwe Smith) Derick Rethans wrote: > On Mon, 23 Oct 2006, Lukas Kahwe Smith wrote: > >> Pierre wrote: >>> On 10/23/06, Pierre wrote: >>>> Hello, >>>> >>>> On 10/23/06, Ilia Alshanetsky wrote: >>>>> Use of mktime(0) and alike is improper use of the function, more over >>>>> generally it can be traced to an undesired code behavior. >>>> Which is? mktime(0) is just like mktime(24); if it is not the case, >>>> there is a bug (it is the case). But I suppose you mean mktime(0,0,0, >>>> 0,0,0);? >>>> >>>> However and for the clarity/sanitiy of this discussion mktime(0,0,0, >>>> 0,0,0) does not raise any error, mktime(); does. >>>> >>>> To solve the only argument in favour of this error message, Derick >>>> should simply remove the notice and add these three little line before >>>> the arguments parsing: >>>> >>>> if (ZEND_NUM_ARGS() == 0) { >>>> RETURN_LONG((long)time(NULL)); >>>> } >>> To be exact: >>> >>> if (NUM_ARGS()==0 && !gmt) { RETURN_LONG((long)time(NULL)); } >>> >>> as gmmktime uses php_mktime as well, but in GMT mode. >> Yes, I see no point in pushing this responsibility into the userland, >> especially since its a BC break appearently. > > There is no BC break: I meant, there would be a BC break if this feature gets dropped, which is the point of the message, right? regards, Lukas