3v4l.org

run code in 300+ PHP versions simultaneously
<?php $delidate = "2014-04-04"; function getNextMonthN($date, $n = 1) { $newDate = strtotime('+' . $n . ' months', $date); if (date('j', $date) !== (date('j', $newDate))) { $newDate = mktime(0, 0, 0, date('n', $newDate), 0, date('Y', $newDate)); } return $newDate; } getNextMonthN($delidate, $n = 1);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: strtotime(): Argument #2 ($baseTimestamp) must be of type ?int, string given in /in/SiDe2:5 Stack trace: #0 /in/SiDe2(5): strtotime('+1 months', '2014-04-04') #1 /in/SiDe2(12): getNextMonthN('2014-04-04', 1) #2 {main} thrown in /in/SiDe2 on line 5
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:
37.64 ms | 401 KiB | 8 Q