fork download
  1. <?php
  2. date_default_timezone_set('Europe/London');
  3. $to = '31-05-2016';
  4. print(date("Y-m-t 23:59:59", strtotime($to.' -1 months')));
  5.  
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
2016-05-31 23:59:59