- var_dump: documentation ( source)
<?php
$dateTimeStrBefore = "2024/09/01 10:00:00";
$dateTimeBefore = new DateTimeImmutable($dateTimeStrBefore);
$dateTimeAfter = $dateTimeBefore->modify("-1 second");
var_dump($dateTimeBefore);
var_dump($dateTimeAfter);