Is there a more efficient way to add a specific amount of time to a timestamp in PHP other than using the strtotime function?

Using the DateTime class in PHP is a more object-oriented and efficient way to add a specific amount of time to a timestamp compared to using the strtotime function. By creating a new DateTime object with the initial timestamp and then using the add method to add the desired interval, you can achieve the same result in a more readable and maintainable way.

$timestamp = '2022-01-01 12:00:00';
$interval = new DateInterval('PT1H30M'); // 1 hour and 30 minutes
$date = new DateTime($timestamp);
$date->add($interval);
echo $date->format('Y-m-d H:i:s');