diff --git a/ext/date/tests/bug73837.phpt b/ext/date/tests/bug73837.phpt index de7c8d7079ac..86fd0a871f8f 100644 --- a/ext/date/tests/bug73837.phpt +++ b/ext/date/tests/bug73837.phpt @@ -1,20 +1,24 @@ --TEST-- Bug #73837: Milliseconds in DateTime() +--SKIPIF-- + --FILE-- format( "u" ); - $collect[$key] = true; +$startTS = time(); +$prev_dt = new DateTime(); +while (time() < $startTS + 2) { + $dt = new DateTime(); + if ($prev_dt > $dt) { + var_dump($prev_dt->format("Y-m-d H:i:s.u")); + var_dump($dt->format("Y-m-d H:i:s.u")); + break; + } + $prev_dt = $dt; } -// For low-resolution clocks, we may construct many objects in the same tick. -var_dump($n = count( $collect )); -echo $n > 200 ? "microseconds differ\n" : "microseconds do not differ enough ($n)\n"; +echo "Finished\n"; ?> --EXPECTF-- -int(%d) -microseconds differ +Finished