- floor: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$expira = date('Y-m-d', strtotime('2014-04-01 + 182 days'));
$diff = $expira - strtotime(date('Y-m-d'));
$daysleft=floor($diff/(60*60*24));
echo "$daysleft days left";
?>