I’m trying to understand what $now parameter is doing in php function
strtotime(string $time [, int $now = time() ])
Everybody seems to simply ignore the $now parameter and the documentation for it is not very clear.
How does that parameter really affect the returned value?
It is an optional parameter for a unix timestamp. If it is used, the current clock used in the function will be the value of the
$nowotherwise, the current timestamp is used.For example, if you pop in “yesterday” if you don’t put in the optional param, it assumes you mean yesterday really. If you put in the timetamp for 1 week ago, it gives you the answer for yesterday i week ago.