fork(3) download
  1. <?php
  2. //output of datetime
  3. $tempDate = DateTime::createFromFormat('j-M-Y', '15-Feb-2009');
  4. echo $tempDate->format('Y-m-d H:i:s');
  5.  
  6. //for debug - var_dump()
  7. var_dump($tempDate);
Success #stdin #stdout 0s 83904KB
stdin
Standard input is empty
stdout
2009-02-15 19:09:02object(DateTime)#1 (3) {
  ["date"]=>
  string(26) "2009-02-15 19:09:02.000000"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(3) "UTC"
}