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.1.0 - 7.1.0
Notice: A non well formed numeric value encountered in /in/SiDe2 on line 5 Notice: A non well formed numeric value encountered in /in/SiDe2 on line 6
Output for 4.3.0 - 5.0.5