fork download
  1. <?php
  2. if (date("Y-m") == date("Y-m", strtotime ("-1 month"))) {
  3. echo date("Y-m", strtotime ("last day of last month"));
  4. } else {
  5. echo date("Y-m", strtotime ("-1 month"));
  6. }
Success #stdin #stdout 0.02s 24552KB
stdin
Standard input is empty
stdout
2020-02