Creating an interval:

<?php
// full notation
$i = new DateInterval'P0003-01-15T06:12:30' );

// abbreviated notation
$i = new DateInterval'P3DT6H' );

// from a difference
$d1 = new DateTimeImmutable();
$d2 = new DateTimeImmutable"2019-10-31 23:00 Europe/London" );
$i $d1->diff$d2 );

// displaying the difference
echo $i->format'%a days, %h hours, %i minutes' ), "\n";
echo 
$i->format'%m months, %d days, %h hours, %i minutes' ), "\n";
?>
Output
1841 days, 10 hours, 40 minutes 0 months, 14 days, 10 hours, 40 minutes
<?php
// create from string
$i DateInterval::createFromDateString"next weekday" );
?>