note 87078 deleted from function.strtotime by danbrown

From: Date: Tue, 18 Nov 2008 21:34:38 +0000
Subject: note 87078 deleted from function.strtotime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146668@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- <?php /** * strToTime wrapper * * @bool bool|int - returns false for '0000-00-00' and '0000-00-00 00:00:00' */ function myStrToTime(string $time, int $now = null) { if('0000-00-00' == $time || '0000-00-00 00:00:00' == $time) { return false; } //In version 5.2.6 strToTime returns int(-62169966000) for the 0 dates above return strToTime($time, $now); } ?>

« previous php.notes (#146668) next »