Last active
December 15, 2016 14:45
-
-
Save mrjosh/1b648478ec768636813689026da4bc72 to your computer and use it in GitHub Desktop.
Get UnixTime With php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get UnixTime With php | |
// with this function , you can get the current unix time in php | |
function getUnixtime(){ | |
$seconds = microtime(true); // true = float, false = weirdo "0.2342 123456" format | |
return round(($seconds * 1000)); // return result | |
} | |
//Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment