Month’s first and last day

How to get month's first and last day in case you have your own variables? $month = 5; $full_year = 2016; For first day we can use: date("01.$month.$full_year"); // 01.05.2016 And for the last year: date("t.$month.$full_year"); // 31.05.2016