For day 10 of 21 in the “PHP Function of the day” series, I’m going to look at time(). It simply gets the number of seconds elapsed since the Unix Epoch.
Let’s take a look.
<?php
echo ‘It has been ‘.time().’ seconds since January 1 1970 00:00:00 GMT’;
?>
This has pretty limited utility on it’s own but used with other functions, it can do useful things.