3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt1 = getdate(); $dt2 = getdate(); $date1 = date_create("".$dtl.""); $date2 = date_create("".$dt2.""); $dateDiff = date_diff($date2, $date1); $probDays = $dateDiff->days; $probMon = $dateDiff->m; $probYear = $dateDiff->y; $month = $probDays / 30; $totLeave = $month * 1; if($month > $probmon) { $totLeave = $totLeave + 1; } ?>
Output for git.master, git.master_jit
Warning: Undefined variable $dtl in /in/tGsoR on line 5 Warning: Array to string conversion in /in/tGsoR on line 7 Fatal error: Uncaught TypeError: date_diff(): Argument #1 ($baseObject) must be of type DateTimeInterface, bool given in /in/tGsoR:9 Stack trace: #0 /in/tGsoR(9): date_diff(false, Object(DateTime)) #1 {main} thrown in /in/tGsoR on line 9
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $dtl in /in/tGsoR on line 5 Warning: Array to string conversion in /in/tGsoR on line 7 Fatal error: Uncaught TypeError: date_diff(): Argument #1 ($baseObject) must be of type DateTimeInterface, false given in /in/tGsoR:9 Stack trace: #0 /in/tGsoR(9): date_diff(false, Object(DateTime)) #1 {main} thrown in /in/tGsoR on line 9
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:
88.25 ms | 401 KiB | 8 Q