The PHP time() function returns the current time in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

				
					<?php
$time = time();
echo($time . '<br>');
echo(date('Y-m-d', $time));
?>
				
			

Output

				
					1696101088
2023-09-30
				
			

Syntax

				
					time()