Re: Why is mktime(0,0,0,0,0,0) E_STRICT?

From: Date: Sun, 22 Oct 2006 22:08:29 +0000
Subject: Re: Why is mktime(0,0,0,0,0,0) E_STRICT?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-26159@lists.php.net to get a copy of this message
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

« previous php.internals (#26159) next »