Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26161 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33269 invoked by uid 1010); 22 Oct 2006 22:29:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 33254 invoked from network); 22 Oct 2006 22:29:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2006 22:29:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=good Received-SPF: pass (pb1.pair.com: domain gmail.com designates 66.249.92.174 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 66.249.92.174 ug-out-1314.google.com Linux 2.4/2.6 Received: from [66.249.92.174] ([66.249.92.174:44579] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/CA-54754-4B0FB354 for ; Sun, 22 Oct 2006 18:29:10 -0400 Received: by ug-out-1314.google.com with SMTP id 80so1041849ugb for ; Sun, 22 Oct 2006 15:29:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=niaJHgwccQopQNf/t5HXC5tBW0AosZMky9VczotTuOrP/EVxVxnVIdAOcSwO2LvnOpbOR3PXuKDbQ/LBy106kewjAfPvwgpMRT0al4PkdVQ8golzIO8Z2k6fPbwZ3In/HMGWghDJ5BD6dYJHYR9Za0ViQQYmmhZ8WmWkZV/3Tkg= Received: by 10.78.200.3 with SMTP id x3mr6382104huf; Sun, 22 Oct 2006 15:29:05 -0700 (PDT) Received: by 10.78.137.6 with HTTP; Sun, 22 Oct 2006 15:29:05 -0700 (PDT) Message-ID: Date: Mon, 23 Oct 2006 00:29:05 +0200 To: "Ilia Alshanetsky" Cc: RQuadling@googlemail.com, "php internals LIST" In-Reply-To: <1B060546-A982-497C-8241-680044CDED15@prohost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <10845a340610221045x2439b02alee7829425c902468@mail.gmail.com> <1B060546-A982-497C-8241-680044CDED15@prohost.org> Subject: Re: [PHP-DEV] Why is mktime(0,0,0,0,0,0) E_STRICT? From: pierre.php@gmail.com (Pierre) 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)); } the slow down is then only an extra C function call. It is an easy solution for possibly annoying change. --Pierre