fork(1) download
  1. <?php
  2. date_default_timezone_set('Europe/London');
  3. $to = '31-05-2016';
  4. $month = date("M Y", strtotime($to));
  5. $strtotime_expression = "last day of " . $month;
  6. echo $strtotime_expression.": <br />";
  7. print(date("Y-m-t 23:59:59", strtotime($strtotime_expression)));
  8.  
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
last day of May 2016: <br />2016-05-31 23:59:59