Re: Why is mktime(0,0,0,0,0,0) E_STRICT?
| From: | Rasmus Lerdorf | Date: | Sun, 22 Oct 2006 22:27:41 +0000 |
| Subject: | Re: Why is mktime(0,0,0,0,0,0) E_STRICT? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-26160@lists.php.net to get a copy of this message | ||
Ilia Alshanetsky wrote:
On 22-Oct-06, at 5:48 PM, Lukas Kahwe Smith wrote:Yes, but E_STRICT is not an argument validation error level. Throwing an E_STRICT here is quite wrong unless we have completely redefined E_STRICT to mean just about any sort of error. mktime($a) is perfectly fine at the language level and E_STRICT is supposed to be language-level errors not something that is thrown based on the value of $a. -RasmusDerick Rethans wrote: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.On Sun, 22 Oct 2006, Richard Quadling wrote: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 integersWith 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.