3v4l.org

run code in 300+ PHP versions simultaneously
<?php $interval = new DateInterval('P1D'); // 1Day Interval $daterange = new DatePeriod($time['start'], $interval , 2); $return['days'] = array(); foreach($daterange as $date){ $return['days'][] = $date->format("Y-m-d"); }
Output for git.master, git.master_jit
Warning: Undefined variable $time in /in/hkhe1 on line 3 Warning: Trying to access array offset on value of type null in /in/hkhe1 on line 3 Fatal error: Uncaught TypeError: DatePeriod::__construct() accepts (DateTimeInterface, DateInterval, int [, int]), or (DateTimeInterface, DateInterval, DateTime [, int]), or (string [, int]) as arguments in /in/hkhe1:3 Stack trace: #0 /in/hkhe1(3): DatePeriod->__construct(NULL, Object(DateInterval), 2) #1 {main} thrown in /in/hkhe1 on line 3
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $time in /in/hkhe1 on line 3 Warning: Trying to access array offset on null in /in/hkhe1 on line 3 Fatal error: Uncaught TypeError: DatePeriod::__construct() accepts (DateTimeInterface, DateInterval, int [, int]), or (DateTimeInterface, DateInterval, DateTime [, int]), or (string [, int]) as arguments in /in/hkhe1:3 Stack trace: #0 /in/hkhe1(3): DatePeriod->__construct(NULL, Object(DateInterval), 2) #1 {main} thrown in /in/hkhe1 on line 3
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 ms | 401 KiB | 8 Q