function microtime

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Component/Datetime/TimeTest.php \Drupal\Tests\Component\Datetime\microtime()
  2. 10 core/tests/Drupal/Tests/Component/Datetime/TimeTest.php \Drupal\Tests\Component\Datetime\microtime()
  3. 9 core/tests/Drupal/Tests/Component/Datetime/TimeTest.php \Drupal\Tests\Component\Datetime\microtime()
  4. 8.9.x core/tests/Drupal/Tests/Component/Datetime/TimeTest.php \Drupal\Tests\Component\Datetime\microtime()

Shadow microtime system call.

Return value

float The fixed float timestamp used for testing purposes.

File

core/tests/Drupal/Tests/Component/Datetime/TimeTest.php, line 144

Namespace

Drupal\Tests\Component\Datetime

Code

function microtime(bool $as_float = FALSE) : float {
  return 1234567.89;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.