3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new \DateTime('2015-05-24 00:00:00'); $time = new \DateTime('0000-00-00 21:22:00'); $pickUpDateTime = new \DateTime(); $pickUpDateTime->setDate($date->format('Y'), $date->format('m'), $date->format('d')); $pickUpDateTime->setTime($time->format('H'), $time->format('i'), $time->format('s')); $now = new DateTime("now"); $interval = $now->diff( $pickUpDateTime );; print $interval->format("%H:%I:%S");
based on ZR91f
Output for 5.6.28, 7.0.20 - 7.2.0
15:08:12
Output for 7.0.6
15:56:03
Output for 7.0.5
11:58:31
Output for 7.0.4
00:04:55
Output for 7.0.3
01:28:16
Output for 7.0.2
07:41:30
Output for 7.0.1
10:49:15
Output for 7.0.0
12:42:39
Output for 5.6.21
18:51:23
Output for 5.6.20
11:00:22
Output for 5.6.19
08:12:51
Output for 5.6.18
17:09:47
Output for 5.6.17
04:41:47
Output for 5.6.16
13:31:53
Output for 5.6.15
14:21:02
Output for 5.6.14
20:03:32
Output for 5.6.13
20:42:35
Output for 5.6.12
11:11:31
Output for 5.6.11
17:37:20
Output for 5.6.10
19:43:22
Output for 5.6.9
01:09:14
Output for 5.6.8
09:39:40
Output for 5.5.35
04:38:19
Output for 5.5.34
13:14:09
Output for 5.5.33
11:11:43
Output for 5.5.32
21:05:54
Output for 5.5.31
07:50:31
Output for 5.5.30
16:13:14
Output for 5.5.29
11:00:15
Output for 5.5.28
14:29:59
Output for 5.5.27
16:08:55
Output for 5.5.26
22:23:56
Output for 5.5.25
05:49:17
Output for 5.5.24
19:29:12
Output for 5.4.45
15:08:16
Output for 5.4.44
15:08:17
Output for 5.4.43
15:08:19
Output for 5.4.41 - 5.4.42
15:08:20
Output for 5.4.40
15:08:21
Output for 5.4.38 - 5.4.39
15:08:22
Output for 5.4.36 - 5.4.37
15:08:23
Output for 5.4.34 - 5.4.35
15:08:24
Output for 5.3.29, 5.4.31 - 5.4.32
15:08:25
Output for 5.4.28 - 5.4.30
15:08:26
Output for 5.4.26 - 5.4.27
15:08:27
Output for 5.4.23 - 5.4.25
15:08:28
Output for 5.3.28, 5.4.21 - 5.4.22
15:08:29
Output for 5.4.19 - 5.4.20
15:08:30
Output for 5.3.27, 5.4.17 - 5.4.18
15:08:31
Output for 5.3.25 - 5.3.26, 5.4.14 - 5.4.16
15:08:32
Output for 5.3.21 - 5.3.24, 5.4.11 - 5.4.13
15:08:33