3v4l.org

run code in 300+ PHP versions simultaneously
<?php $today = getdate(); $last2Months = getdate(strtotime("2 months ago", $today[0])); var_dump($last2Months); $nextMonth = getdate(strtotime("+1 month",$last2Months[0])); var_dump($nextMonth);

preferences:
47.48 ms | 402 KiB | 5 Q