Edit report at https://bugs.php.net/bug.php?id=65728&edit=1
ID: 65728 User updated by: sebastiankuhlmann at web dot de Reported by: sebastiankuhlmann at web dot de Summary: \DateInterval->days turns from boolean to integer value -Status: Open +Status: Closed Type: Bug Package: Date/time related Operating System: independant PHP Version: <5.5.4 Block user comment: N Private report: N New Comment: Fixed in 5.4.20 and 5.5.4 Previous Comments: ------------------------------------------------------------------------ [2013-09-20 14:48:33] sebastiankuhlmann at web dot de Changed PHP Version after stumbling upon https://github.com/php/php-src/commit/b378b0b081c2c3dd4a7aa25ce4d37bad48db752e ------------------------------------------------------------------------ [2013-09-20 14:45:35] jason at fuzzystatic dot com This seems to work as expected in PHP 5.5.4 (latest version of 5.5 at this time) ------------------------------------------------------------------------ [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