3v4l.org

run code in 300+ PHP versions simultaneously
<?php function daysBetween($start_date, $end_date, $weekDay) { $first_date = strtotime($start_date." -1 days"); $first_date = strtotime(date("M d Y",$first_date)." next ".$weekDay); $last_date = strtotime($end_date." +1 days"); $last_date = strtotime(date("M d Y",$last_date)." last ".$weekDay); return floor(($last_date - $first_date)/(7*86400)) + 1; } print daysBetween("DEC 13 2005", "DEC 26 2005", "Monday");
Output for git.master, git.master_jit, rfc.property-hooks
2

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:
48.04 ms | 401 KiB | 8 Q