fork(1) download
  1. <?php
  2. function to_unix($time) {
  3. $expl = explode(' ', $time);
  4. $year = explode('-',$expl[0]);
  5. $time = explode(':', $expl[1]);
  6. $unix = mktime($time[0],$time[1],$time[2],$year[1],$year[2],$year[0]);
  7. return $unix;
  8. }
  9. $time = '2013-10-28 12:00:00';
  10. echo to_unix($time);
  11. ?>
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
1382961600