How to get current Unix Timestamp in PHP

The below code shows you the way to get current unix timestamp in PHP.

TimestampExample.php
<?php

$currentTimestamp = time();
echo $currentTimestamp;

Output:

1512014782

guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x