This can be usefull for people that are switching from PHP4 to PHP5, be carefull when you use the strtotime-function
In PHP 4.4.6 following code return equal timestamps, as in PHP 5.1.4 they return other timestamps
PHP 4.4.6
// returns the current timestamp (25/09/2007 20:21:52)echo date(‘d/m/Y H:i:s’, strtotime(‘today’));
// returns the current timestamp (25/09/2007 20:21:52)
echo date(‘d/m/Y H:i:s’, strtotime(‘now’));
PHP 5
// returns the current date at midnight (25/09/2007 00:00:00)echo date(‘d/m/Y H:i:s’, strtotime(‘today’));
// returns the current timestamp (25/09/2007 20:21:52)
echo date(‘d/m/Y H:i:s’, strtotime(‘now’));
Same results, but don’t using the strtotime-method
// returns the current date at midnight (25/09/2007 00:00:00)echo date(‘d/m/Y H:i:s’, mktime(0,0,0));
// returns the current timestamp (25/09/2007 20:21:52)
echo date(‘d/m/Y H:i:s’) ;