Re: Why is mktime(0,0,0,0,0,0) E_STRICT?
| From: | Richard Quadling | Date: | Mon, 23 Oct 2006 11:13:38 +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-26181@lists.php.net to get a copy of this message | ||
On 23/10/06, Pierre <pierre.php@gmail.com> wrote:
Hello, On 10/23/06, Richard Quadling <rquadling@googlemail.com> wrote: On 23/10/06, Derick Rethans <derick@php.net> wrote:Yes. I was wrong. Sorry. And a perfect fix. Now mktime() is an alias for time(), except when additional parameters are supplied. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"On Mon, 23 Oct 2006, Lukas Kahwe Smith wrote:In a simple test, 100000 calls to time() took 0.055 seconds and mktime() took 3.2 seconds. Nearly 60 times faster to use time(). Didn't realise that. If you read the other replies to your initial question (which was wrong :), you will realize another thing, this is easily fixable with minimum effort and impact: http://pecl.php.net/~pierre/remove_mktime_strict.txt No visible speed difference . --PierreYeah, but there is no point in calling mktime() without arguments as you can use time() doing the same. It's just a friendly hint that you're wasting CPU cycles. It's an E_STRICT message for ****s sake.I meant, there would be a BC break if this feature gets dropped, which is the point of the message, right?Yes, I see no point in pushing this responsibility into the userland, especially since its a BC break appearently.There is no BC break: