- mktime: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
echo "Today is ", date("Y-m-d"), "\n";
echo date("-t"), " days from today is ", date("Y-m-d", strtotime(date("-t") . " days")), "\n\n";
$anchor = mktime(0, 0, 0, 3, 1, 2015);
echo date("-t", $anchor), " days from ", date("Y-m-d", $anchor), " is ", date("Y-m-d", strtotime(date("-t", $anchor) . " days")), "\n";