PHP code example of stevegrunwell / time-constants
1. Go to this page and download the library: Download stevegrunwell/time-constants 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/ */
stevegrunwell / time-constants example snippets
cache($cacheKey, $value, 24 * 60 * 60);
cache($cacheKey, $value, \TimeConstants\DAY_IN_SECONDS);
cache($cacheKey, $value, 5 * \TimeConstants\DAY_IN_SECONDS);
6000 === (6 * ONE_SECOND) * 1000 === 6 * MILLISECONDS_PER_SECOND