<?php
$a = strtotime("2016-10-1 15:50:00");
$b = strtotime("2016-10-1 18:15:00");
echo date("H:i:s",$b-$a);
$c = $a + date("H:i:s",$b-$a);
echo $c
?>
- Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- 03:25:00
Warning: A non-numeric value encountered in /in/aTWDU on line 6
1475329803
- Output for 8.0.13
- 02:25:00
Warning: A non-numeric value encountered in /in/aTWDU on line 6
1475337002
- Output for 7.1.0 - 7.1.33, 7.2.6 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
- 03:25:00
Notice: A non well formed numeric value encountered in /in/aTWDU on line 6
1475329803
- Output for 7.3.32 - 7.3.33
- 02:25:001475337002
- Output for 5.5.0 - 5.5.37, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20
- 03:25:001475329803
preferences:
210.41 ms | 402 KiB | 248 Q