How To Get The Current Timestamp In Php

[Solved] How To Get The Current Timestamp In Php | Php - Code Explorer | yomemimo.com
Question : Getting Current Timestamp in PHP

Answered by : prashant-rawal

<?php
$current_timestamp = time();
echo $current_timestamp;
?>

Source : https://phppot.com/php/php-timestamp/ | Last Update : Sat, 30 Jul 22

Question : how to get the current timestamp in php

Answered by : vivacious-vulture-2ahqzugyt2fc

echo $difference_in_seconds = strtotime('2016-11-30 11:55:06') - strtotime('2016-11-30 03:55:06');//28800

Source : https://stackoverflow.com/questions/40905174/calculate-the-difference-between-2-timestamps-in-php | Last Update : Mon, 17 Oct 22

Question : how to get the current timestamp in php

Answered by : vivacious-vulture-2ahqzugyt2fc

%Y - use for difference in year
%m - use for difference in months
%d - use for difference in days
%H - use for difference in hours
%i - use for difference in minutes
%s - use for difference in seconds

Source : https://stackoverflow.com/questions/40905174/calculate-the-difference-between-2-timestamps-in-php | Last Update : Mon, 17 Oct 22

Answers related to how to get the current timestamp in php

Code Explorer Popular Question For Php