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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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 Apr 18 12:01:28 2024 UTC