Domanda

Are there any differences between using functions time() and mktime() with default parameters to obtain current timestamp?

È stato utile?

Soluzione

"As of PHP 5.1, when called with no arguments, mktime() throws an E_STRICT notice: use the time() function instead."

http://php.net/manual/en/function.mktime.php

If you want to use dates/times, I recommend DateTime instead.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top