php time() vs mktime() for current timestamp

Sergey Terehin picture Sergey Terehin · Mar 28, 2013 · Viewed 13.1k times · Source

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

Answer

Anyone picture Anyone · Mar 28, 2013

"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.