- floor: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$expire = date('Y-m-d', strtotime('2014-04-01'));
$diff = strtotime($expire) - strtotime(date('Y-m-d'));
$daysleft = floor( $diff / (60 * 60 * 24) );
echo $daysleft;