fork download
  1. <?php
  2. date_default_timezone_set('America/Los_Angeles');
  3. $day = date("l");
  4. echo date("Y-m-d", strtotime("last $day")) . "\n";
  5. echo date("Y-m-d", strtotime("last $day + 1 day")) . "\n";
  6. echo date("Y-m-d", strtotime("last $day + 6 day")) . "\n";
  7. echo date("Y-m-d", strtotime("last $day + 7 day")) . "\n";
  8.  
Success #stdin #stdout 0s 82624KB
stdin
Standard input is empty
stdout
2019-05-21
2019-05-22
2019-05-27
2019-06-04