xref: /PHP-7.4/ext/date/tests/bug73837.phpt (revision c39a10bc)
1--TEST--
2Bug #73837: Milliseconds in DateTime()
3--FILE--
4<?php
5$collect = [];
6
7for ( $i = 0; $i < 1000; $i++ )
8{
9	$a = new DateTime();
10	$key = "s" . $a->format( "u" );
11	$collect[$key] = true;
12}
13
14var_dump($n = count( $collect ));
15echo ( $n > 700 ) ? "microseconds differ\n" : "microseconds do not differ enough ($n)\n";
16?>
17--EXPECTF--
18int(%d)
19microseconds differ
20