3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $now = strtotime('2014-12-01'); // simulating year wrap $currentMonth = date('n', $now); $year = date('Y', $now); $nextMonth = $currentMonth + 1; $secondNextMonth = $currentMonth + 2; echo '<th>' . date('M', $now) . '</th>'; echo '<th>' . date('M', mktime(0, 0, 0, $nextMonth, 1, $year)) . '</th>'; echo '<th>' . date('M', mktime(0, 0, 0, $secondNextMonth, 1, $year)) . '</th>';
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<th>Dec</th><th>Jan</th><th>Feb</th>