fork download
<?php

    $datetime1 = new DateTime('01-04-2018');
    $datetime2 = new DateTime('10-04-2018');
    $interval = $datetime1->diff($datetime2);
    echo $interval->format('%R%a days');
Success #stdin #stdout 0.02s 23832KB
stdin
Standard input is empty
stdout
+9 days