xref: /PHP-8.1/ext/date/tests/bug81500.phpt (revision 866adb12)
1--TEST--
2Bug #81500 (Interval serialization regression since 7.3.14 / 7.4.2)
3--FILE--
4<?php
5$interval = new DateInterval('PT1S');
6$interval->f = -0.000001;
7var_dump($interval->s, $interval->f);
8
9$interval = unserialize(serialize($interval));
10var_dump($interval->s, $interval->f);
11?>
12--EXPECT--
13int(1)
14float(-1.0E-6)
15int(1)
16float(-1.0E-6)
17