<?php
$first_date = new DateTime($today);
$second_date = new DateTime($plan_expiry);
$interval = $first_date->diff($second_date);

// Output: 34 years 02 months and 09 days 00 hours 00 minutes and 00 seconds.
//echo $interval->format('%Y years %M months and %D days %H hours %I minutes and %S seconds.');
$countd = $interval->format('%M-%D-%H');





/*$first_date = new DateTime('07-02-2024');
$second_date = new DateTime('10-02-2024');
$interval = $first_date->diff($second_date);

// Output: 34 years 02 months and 09 days 00 hours 00 minutes and 00 seconds.
//echo $interval->format('%Y years %M months and %D days %H hours %I minutes and %S seconds.');
$countd = $interval->format('%M months and %D days %H hours');

echo $countd;
/*$first_date = new DateTime('2010-07-19T10:56:37+00:00');
$second_date = new DateTime('2018-09-12T23:10:15+05:30');
$interval = $first_date->diff($second_date);

// Output: 08 years 01 months and 24 days 06 hours 43 minutes and 38 seconds.
echo $interval->format('%Y years %M months and %D days %H hours %I minutes and %S seconds.');
*/

?>