3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user_id = 42; $month = 2; $year = 2016; $numberOfDaysInMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year); $weekDays = array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'); for($i=0;$i<$numberOfDaysInMonth;$i++){ $NewDate= date('01') + $i . '/' . $month . '/' . $year; $y = date('w'); $monthlyHour[$i] = new StdClass(); $monthlyHour[$i]->user_id= $user_id; $monthlyHour[$i]->tp = 10; $monthlyHour[$i]->days= $weekDays[$y]; $monthlyHour[$i]->date= $NewDate; $monthlyHour[$i]->working_hours = 5; } print_r($monthlyHour);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function cal_days_in_month() in /in/g1Imk:6 Stack trace: #0 {main} thrown in /in/g1Imk on line 6
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:
41.85 ms | 2008 KiB | 4 Q