mktime(0, 0, 0, $month_end, $day_end, $year_end)))
vs
mktime(0, 0, 0, $day_end, $month_end, $year_end)))
In one you are getting the 12th month, in one the 12th day. In the other you are getting the 26th month (so it's adding some years), in the other the 26th day.
That's the issue.