PHP microtime() function

PHP localtime() function
PHP mktime() function

What is the syntax of the microtime() function in PHP?

microtime(return_float);
ParameterDescription
return_floatOptional. When set to TRUE it specifies that the function should return a float, instead of a string. Default is FALSE

Examples of the microtime() function

Example 1. In this example,

<?php
// Prints: October 3, 1975 was on a Friday
echo "Oct 3, 1975 was on a ".date("l", mktime(0,0,0,10,3,1975));
?>
PHP localtime() function
PHP mktime() function
en English
X
Scroll to Top