I need a timestamp code similar to this JavaScript code:
new Date().getTime()
I tried this PHP code:
$date = new DateTime();
$ts = $date->getTimestamp();
which returns 1376399143
but the JavaScript code returns 1376399143263
, I think my PHP code generates a timestamp for only the date. How can I get the timestamp for the time portion as well?