PHP code example of jasperalani / unix-time
1. Go to this page and download the library: Download jasperalani/unix-time library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jasperalani / unix-time example snippets
echo new UnixTime("5m"); // five minutes: 300
$time = new UnixTime('5m', 'x3'); // fifteen minutes: 900
$time = new UnixTime('three_years', 'x2');
echo $time->time(); // time() function returns the time
$time->time(true); // specify echo argument to echo the time
echo $time->format(); // format() functions returns the current time + preset time