note 87362 deleted from function.strtotime by danbrown

From: Date: Tue, 02 Dec 2008 15:09:41 +0000
Subject: note 87362 deleted from function.strtotime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147550@lists.php.net to get a copy of this message
Note Submitter: ash at ashmckenzie dot org ---- <?php $dates = array('11/12/2008', '12/12/2008', '13/12/2008'); foreach ( $dates as $date ) { $result = strtotime($date); if ( ! $result || $result == -1 ) { $result = 'false/-1'; } print "INFO: $date result=[$result]\n"; } ?> The snippet above produces different results for the third array element in PHP4 compared to PHP5: - PHP 4.3.9 (cgi) (built: Nov 13 2007 08:03:36) INFO: 11/12/2008 result=[1226410200] INFO: 12/12/2008 result=[1229002200] INFO: 13/12/2008 result=[1231680600] PHP 5.2.5 (cli) (built: Sep 30 2008 12:31:52) INFO: 11/12/2008 result=[1226410200] INFO: 12/12/2008 result=[1229002200] INFO: 13/12/2008 result=[false/-1]

« previous php.notes (#147550) next »