3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lastWeekDay($mnt) { $result = strtotime("1 $mnt"); $result = mktime(0, 0, 0, date('n', $result) + 1, 0, date('Y', $result)); while(in_array(date('D', $result), array('Sat', 'Sun'))) $result -= 86400; return $result; } foreach (array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec') as $month) { echo date('d-M-Y', lastWeekDay("$month 2013")) . "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
31-Jan-2013 28-Feb-2013 29-Mar-2013 30-Apr-2013 31-May-2013 28-Jun-2013 31-Jul-2013 30-Aug-2013 30-Sep-2013 31-Oct-2013 29-Nov-2013 31-Dec-2013

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.04 ms | 401 KiB | 8 Q