Simple types / Date and time

<?php

$nowStr = date('Y-m-d H:i:s');
//nowStr is 2020-07-06 21:58:42, type: string

$now = new DateTime();
//now is 2020-07-06, type: object

$nowTime = strtotime('now');
//nowTime is 1594073137 = 2020-07-06 22:05:37

echo $nowStr, ", type: "gettype($nowStr), "\n";
echo $now->format('Y-m-d'), ", type: "gettype($now), "\n";
echo $nowTime, " = "date('Y-m-d H:i:s', $nowTime);