Skip to content

Instantly share code, notes, and snippets.

@mrjosh
Last active December 15, 2016 14:45
Show Gist options
  • Save mrjosh/1b648478ec768636813689026da4bc72 to your computer and use it in GitHub Desktop.
Save mrjosh/1b648478ec768636813689026da4bc72 to your computer and use it in GitHub Desktop.
Get UnixTime With php
<?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