php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75354 Decimal places of DateInterval::$f are lost
Submitted: 2017-10-10 16:33 UTC Modified: 2017-10-12 13:36 UTC
From: christian dot flothmann at sensiolabs dot de Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 7.2.0RC3 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: christian dot flothmann at sensiolabs dot de
New email:
PHP Version: OS:

 

 [2017-10-10 16:33 UTC] christian dot flothmann at sensiolabs dot de
Description:
------------
Since PHP 7.2 RC1 microseconds are returned as 0 (see https://3v4l.org/W3Xld).

Test script:
---------------
$i = new \DateInterval('PT0S');
$i->f = 0.1;

var_dump($i->f);

Expected result:
----------------
float(0.1)

Actual result:
--------------
float(0)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-12 11:53 UTC] thiago dot oak at gmail dot com
This seems to be fixed on the latest master
 [2017-10-12 13:36 UTC] derick@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: derick
 [2017-10-12 13:36 UTC] derick@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Should be fixed in 7.2.0RC4.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 15:01:32 2024 UTC