- var_dump: documentation ( source)
- getdate: documentation ( source)
- strtotime: documentation ( source)
<?php
$today = getdate();
$last2Months = getdate(strtotime("2 months ago", $today[0]));
var_dump($last2Months);
$nextMonth = getdate(strtotime("+1 month",$last2Months[0]));
var_dump($nextMonth);