3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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";
Output for 4.3.0 - 7.2.0
Today is 2015-03-31 -31 days from today is 2015-02-28 -31 days from 2015-03-01 is 2015-02-28