Ilia Alshanetsky wrote:

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.

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.

-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to