PHP 4.0 Bug #6688: strtotime() function causes loop in do...while condition

From: Date: Tue, 12 Sep 2000 21:40:59 +0000
Subject: PHP 4.0 Bug #6688: strtotime() function causes loop in do...while condition
Groups: php.dev 
Request: Send a blank email to php-dev+get-33011@lists.php.net to get a copy of this message
From: simon.cox@matrixds.co.uk Operating system: MS Win98 SE PHP version: 4.0.2 PHP Bug Type: Date/time related Bug description: strtotime() function causes loop in do...while condition Using the following code with the month of October (any year), generates an endless loop; all other months are fine. <? $dtDate = ("10/01/00"); $nMonth = ("10"); do { // Build a calendar table $dtDate = (date("m/d/y", (strtotime($dtDate) + 86400))); } while (date("m", strtotime($dtDate)) == $nMonth); ?> I am using PHP 4.0.2 and Apache 1.3.12 under MS Windows 98 SE. I have tested this script using Linux, Apache and PHP3 and it executes OK for all months.

« previous php.dev (#33011) next »