3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month = 1; //date("n"); $day = 13; //date("j"); $year = 2014; //date("Y"); if ($day > 15) { $day = 1; } else { if ($month == 1) { $month = 12; $year--; } else { $month--; $day = 16; } $daysinmonth = date("t", strtotime("$year - $month - $day")); } //$rangeEnd = date("Y-m-d 23:59:59", strtotime("last month")); //$rangeStart = date("Y-m-d 00:00:00", strtotime($rangeEnd." -6 days")); echo "$year $month $day $daysinmonth"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
2013 12 13 31

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
40.02 ms | 401 KiB | 8 Q