fork(3) download
  1. <?php
  2.  
  3. $fechaA = '2018-01-01 01:11:01';
  4. $fechaB = '2018-01-01 02:22:00';
  5.  
  6. # Formato HH:MM:SS
  7. $diff = gmdate("H:i:s", strtotime($fechaB)-strtotime($fechaA));
  8. print("-->".$diff."\n");
  9.  
Success #stdin #stdout 0.02s 82624KB
stdin
Standard input is empty
stdout
-->01:10:59