3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 5.4.0 - 5.4.24
Parse error: syntax error, unexpected end of file in /in/tTaTF on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/tTaTF on line 12
Process exited with code 255.