Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26159 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28343 invoked by uid 1010); 22 Oct 2006 22:08:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 28328 invoked from network); 22 Oct 2006 22:08:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2006 22:08:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=iliaal@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=iliaal@gmail.com; sender-id=pass; domainkeys=good Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.166.180 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: iliaal@gmail.com X-Host-Fingerprint: 64.233.166.180 py-out-1112.google.com Linux 2.4/2.6 Received: from [64.233.166.180] ([64.233.166.180:63485] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/F9-54754-8EBEB354 for ; Sun, 22 Oct 2006 18:08:40 -0400 Received: by py-out-1112.google.com with SMTP id t32so268400pyc for ; Sun, 22 Oct 2006 15:08:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=tZjnl8eI9e4rszE0dW2/JM6n1fhzaO0xrlKV8NnZ5rVAGr0AOwbtp0QjuIR9Nu98u4eZb57GUMYFtFw4aQGR/qvKk8/dvK9cbCLRklACVAc80HfKr4mFS8ZUBgMSK/4buz+jUAK75OZ/F2XsO8tztOGIWCuG94tiBsmy0mryP0I= Received: by 10.65.103.17 with SMTP id f17mr4253291qbm; Sun, 22 Oct 2006 15:08:38 -0700 (PDT) Received: from ?192.168.1.6? ( [74.108.69.82]) by mx.google.com with ESMTP id f16sm4911553qba.2006.10.22.15.08.36; Sun, 22 Oct 2006 15:08:37 -0700 (PDT) In-Reply-To: <453BE73B.4020300@php.net> References: <10845a340610221045x2439b02alee7829425c902468@mail.gmail.com> <453BE73B.4020300@php.net> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <59BCAFC2-C867-47B8-82D3-1BD0887568FE@prohost.org> Cc: Derick Rethans , Richard Quadling , php internals LIST Content-Transfer-Encoding: 7bit Date: Sun, 22 Oct 2006 18:08:29 -0400 To: Lukas Kahwe Smith X-Mailer: Apple Mail (2.752.3) Sender: Ilia Alshanetsky Subject: Re: [PHP-DEV] Why is mktime(0,0,0,0,0,0) E_STRICT? From: ilia@prohost.org (Ilia Alshanetsky) On 22-Oct-06, at 5:48 PM, Lukas Kahwe Smith wrote: > Derick Rethans wrote: >> On Sun, 22 Oct 2006, Richard Quadling wrote: >>> With the recent discussion on E_STRICT and the waste of cpu >>> cycles ... >>> >>> Why is mktime(0, 0, 0, 0, 0, 0) generating E_STRICT? >>> >>> What is unstrict about this? >>> >>> Why is important to use time() instead? >> It's quicker. > > as I just said on IRC: > i think an e_strict in that place is wrong .. for example the > parameters could have been user supplied and you simply check that > the parameters are integers That is a weak argument, validation is not just "is the data type correct or not" it should also perform content checks. Not understanding of this basic practice is probably why there are so many insecure PHP applications out-there. > if e_strict is our way of telling users about back practices, we > should really have a consensus on this list about what constitutes > a bad practice. You are working under the assumption that mktime(0) and alike will continue working in future versions, that may not end up being the case. Ilia Alshanetsky