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
1883 days, 20 hours, 0 minutes 1 months, 26 days, 20 hours, 0 minutes
<?php
// create from string
$i DateInterval::createFromDateString"next weekday" );
?>