<?phpif (date("Y-m") == date("Y-m", strtotime ("-1 month"))) { echo date("Y-m", strtotime ("last day of last month"));} else { echo date("Y-m", strtotime ("-1 month"));}
Standard input is empty
2020-02
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!