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

From: Date: Mon, 23 Oct 2006 18:00:13 +0000
Subject: Re: Why is mktime(0,0,0,0,0,0) E_STRICT?
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-26192@lists.php.net to get a copy of this message
Hello, On 10/23/06, Derick Rethans <derick@php.net> wrote:
gmmktime() without parameters is broken in PHP 4 anyway. If you don't give it arguments than it should default to the current date and hour (in GMT for gmmktime() and in localtime for mktime()). In both places this should result in the same timestamp, which gmmktime() doesn't even do on PHP 4:
Our point is to do not raise any warning in these two functions when they are called without arguments. Misunderstanding of the GMT idea by the previous implementation is another topic. I do not understand why it is a problem to add three lines to php_mktime and forget about it rather than adding more pain to the e_strict stack. You like to use only time()? fine, but we still have no way to use "gmmktime();" without warning and we are forced to change our mktime() calls, for no reason. --Pierre

« previous php.internals (#26192) next »