1--TEST--
2Comparing datetime objects with negative timestamps should account for microseconds
3--FILE--
4<?php
5
6date_default_timezone_set('UTC');
7$earlyDate1 = DateTime::createFromFormat('U.u', '1.8642')->modify('-5 seconds');
8$earlyDate2 = DateTime::createFromFormat('U.u', '1.2768')->modify('-5 seconds');
9$earlyDate3 = DateTime::createFromFormat('U.u', '1.2768')->modify('-5 seconds');
10// var_dump($earlyDate1, $earlyDate2, $earlyDate3);
11var_dump($earlyDate1 == $earlyDate2);
12var_dump($earlyDate1 > $earlyDate2);
13var_dump($earlyDate2 < $earlyDate1);
14var_dump($earlyDate2 == $earlyDate3);
15--EXPECT--
16bool(false)
17bool(true)
18bool(true)
19bool(true)
20