3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strtDate = '2015-05-01'; $endDate = '2015-08-31'; $begin = new DateTime($strtDate); $end = new DateTime(date("Y-m-d", strtotime("+1 day", strtotime($endDate)))); // $weekNo = floor($begin->diff($end)->days / 7); $startDateWeekCnt = floor( date('d',strtotime($begin)) / 7) ; // echo $startDateWeekCnt ."\n"; $endDateWeekCnt = floor( date('d',strtotime($end)) / 7) ; //echo $endDateWeekCnt. "\n"; $datediff = strtotime(date('Y-m',strtotime($endDate))."-01") - strtotime(date('Y-m',strtotime($strtDate))."-01"); $totalnoOfWeek = round(floor($datediff/(60*60*24)) / 7) + $endDateWeekCnt - $startDateWeekCnt ; echo $totalnoOfWeek ."\n";
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: strtotime(): Argument #1 ($datetime) must be of type string, DateTime given in /in/phhdV:8 Stack trace: #0 /in/phhdV(8): strtotime(Object(DateTime)) #1 {main} thrown in /in/phhdV on line 8
Process exited with code 255.

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