- date_diff: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
echo date( 'd-m-Y', strtotime('2015-03-07')) - date( 'd-m-Y', strtotime("+ 7 days") );
$t1 = new DateTime( '2015-03-07' );
$t2 = new DateTime( "+7 days" );
echo date_diff($t1, $t2)->days;