Bug #52920 [Fbk->NoF]: Multiple datetime affects divisions
| From: | php-bugs at lists dot php dot net | Date: | Mon, 18 Feb 2013 00:34:29 +0000 |
| Subject: | Bug #52920 [Fbk->NoF]: Multiple datetime affects divisions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176909@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=52920&edit=1
ID: 52920
Updated by: php-bugs@lists.php.net
Reported by: michael at nerdalert dot biz
Summary: Multiple datetime affects divisions
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Date/time related
Operating System: Windows Server 2008 R2 Enterpris
PHP Version: 5.3.3
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2010-09-29 14:02:45] cataphract@php.net
I can't reproduce this with PHP 5.3.3.
What binaries are you using? (thread safety or not, vc6 or vc9)
------------------------------------------------------------------------
[2010-09-24 17:27:33] michael at nerdalert dot biz
Changing the title only
------------------------------------------------------------------------
[2010-09-24 17:25:48] michael at nerdalert dot biz
Description:
------------
The result of this equation (echo 240 / 23;) is NAN in each occurrence when I run DateTime class
before the equation. The datetime class needs to be run multiple times to get the NAN result (for
($a=0;$a<2;$a++){).
Test script:
---------------
for ($a=0;$a<2;$a++){
$lastResponse = date("Y-m-d");
$noResponse = date("Y-m-d");
$dateCreated = new DateTime(date("Y-m-d", strtotime($lastResponse)));
$dateNotCreated = new DateTime(date("Y-m-d", strtotime($noResponse)));
$today = new DateTime(date("Y-m-d"));
if(isset($lastResponse))
{
$diff = $today->diff($dateCreated);
}
else
{
$diff = $today->diff($dateNotCreated);
}
}
echo 240 / 23;
Expected result:
----------------
Not NAN
Actual result:
--------------
NAN
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52920&edit=1