1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 22:41:20 +02:00
Files
archived-php-src/ext/date/tests/bug73837.phpt
Derick Rethans c854bb2472 Fixed GH-8400: bug73837.phpt makes no sense
Replaces the indeed silly test with something that actually does the job,
albeit much slower.
2022-04-22 10:29:37 +01:00

24 lines
454 B
PHP

--TEST--
Bug #73837: Milliseconds in DateTime()
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--
<?php
$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;
}
echo "Finished\n";
?>
--EXPECTF--
Finished