Are there more efficient ways to round timestamps to days in PHP compared to using mktime() and date() functions?

When rounding timestamps to days in PHP, a more efficient way to achieve this is by using the `DateTime` class and its `setTime()` and `format()` methods. This approach simplifies the code and avoids the need to use `mktime()` and `date()` functions.

$timestamp = time(); // Get current timestamp
$roundedTimestamp = (new DateTime())->setTimestamp($timestamp)->setTime(0, 0)->format('Y-m-d H:i:s');
echo $roundedTimestamp;