fork(1) download
  1. <?php
  2.  
  3. // your code goes here
  4. $time= strtotime('2017-10-18 16:08:00.150 +150.356587 msec');
  5. echo 'source time add 150 sec='.date("Y-m-d H:i:s.u",$time)."\r\n";
  6. $datetime=new DateTime(date('Y-m-d H:i:s.u',$time));
  7. echo $time1=$datetime->format('Y-m-d H:i:s.u')."\r\n";
  8. $datetime2=new DateTime();
  9. echo $time2=$datetime2->format('Y-m-d H:i:s.u')."\r\n";
  10. if($time1>$time2){
  11. echo 'time>currenttime';
  12. }else{
  13. echo 'time<currenttime';
  14. }
Success #stdin #stdout 0s 83904KB
stdin
Standard input is empty
stdout
source time add 150 sec=2017-10-18 14:18:02.000000
2017-10-18 14:18:02.000000
2017-10-18 16:45:47.493683
time<currenttime