php-src/ext/standard/tests/time/001.phpt

24 lines
372 B
Plaintext
Raw Normal View History

2001-02-04 16:56:59 +00:00
--TEST--
microtime() function
--POST--
--GET--
--FILE--
<?php
$passed = 0;
$failed = 0;
2001-08-18 16:47:02 +00:00
$last = 0;
set_time_limit(0);
for ($i=1;$i<=100000;$i++) {
2001-02-04 16:56:59 +00:00
list($micro,$time)=explode(" ",microtime());
$add=$micro+$time;
$add<$last ? $failed++: $passed++;
2001-08-18 16:47:02 +00:00
$last=$add;
}
2001-02-04 16:56:59 +00:00
echo "Passed: ".$passed."\n";
echo "Failed: ".$failed."\n";
?>
--EXPECT--
Passed: 100000
Failed: 0