Bug #65728 [Com]: \DateInterval->days turns from boolean to integer value
| From: | jason at fuzzystatic dot com | Date: | Fri, 20 Sep 2013 14:45:36 +0000 |
| Subject: | Bug #65728 [Com]: \DateInterval->days turns from boolean to integer value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181716@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65728&edit=1
ID: 65728
Comment by: jason at fuzzystatic dot com
Reported by: sebastiankuhlmann at web dot de
Summary: \DateInterval->days turns from boolean to integer
value
Status: Open
Type: Bug
Package: Date/time related
Operating System: independant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This seems to work as expected in PHP 5.5.4 (latest version of 5.5 at this time)
Previous Comments:
------------------------------------------------------------------------
[2013-09-20 14:28:38] sebastiankuhlmann at web dot de
Description:
------------
When creating a \DateInterval()-object according to the documentation the 'days'-property
should be false. A var_dump on the object confirms this.
Now if you do a var_dump directly on the 'days'-property the var-type and -value changes
from FALSE to -99999.
https://bugs.php.net/bug.php?id=65654 might be
related to this.
Test script:
---------------
$test = new \DateInterval('P1D');
var_dump($test->days);
Expected result:
----------------
bool(false)
Actual result:
--------------
int(-99999)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65728&edit=1