PHP: time() function
Description
The time() function returns the current time as Unix timestamp. The Unix timestamp measures time as a number of seconds since midnight of Greenwich Mean Time on January 1, 1970.
Version:
(PHP 4 and above)
Syntax:
time()
Return value:
Current Unix timestamp
Value Type: Integer.
Example:
<?php
$curr_time = time();
echo(date('D F d Y', $curr_time));
?>
Sample Output:
Tue October 03 2017
Note : Since the time/date is not static, therefore the output may vary.
View the Example in the browser
See also
Previous: strtotime
Next: Directory Functions chdir
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/php/function-reference/time.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics