php to timestamp code example
Example 1: php timestamp to date
<?php
echo date('m/d/Y H:i:s', 1541843467);
?>
Example 2: strtotime format
$date = '25/05/2010';
$date = str_replace('/', '-', $date);
echo date('Y-m-d', strtotime($date));
Example 3: php date object to timestamp
$date = new DateTime();
echo $date->getTimestamp();