php set timestamp value code example Example: timestamp php <?php $date = new DateTime(); echo $date->getTimestamp(); ?>