1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/date/tests/bug81106.phpt
Derick Rethans 66ea59e38e Import timelib 2021.07
Fixes:
- Bug #80998 (Missing second with inverted interval). (Derick)
- Bug #81106 (Regression in 8.1: add() now truncate ->f). (Derick)
2021-08-08 17:22:06 +01:00

12 lines
286 B
PHP

--TEST--
Bug #81106: Regression in 8.1: add() now truncate ->f
--FILE--
<?php
$dateInterval = new DateInterval('PT0S');
$dateInterval->f = 1.234;
echo (new DateTimeImmutable('2000-01-01 00:00:00'))->add($dateInterval)->format('Y-m-d H:i:s.u');
?>
--EXPECT--
2000-01-01 00:00:01.234000