3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $change = 1453404531; $then = new DateTime("@$change"); $now = new DateTime("now"); $interval = date_diff($now, $then); echo $interval->format("%h Hours %m Minutes");
based on QbSd3
Output for 5.3.22 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
0 Hours 0 Minutes
Output for 5.5.27, 7.0.6
16 Hours 3 Minutes
Output for 7.0.1, 7.0.5
12 Hours 2 Minutes
Output for 7.0.4
1 Hours 1 Minutes
Output for 7.0.3
3 Hours 1 Minutes
Output for 7.0.2
9 Hours 2 Minutes
Output for 5.5.34, 7.0.0
13 Hours 2 Minutes
Output for 5.6.21
19 Hours 3 Minutes
Output for 5.5.29, 5.6.12, 5.6.20
11 Hours 2 Minutes
Output for 5.5.31, 5.6.19
9 Hours 1 Minutes
Output for 5.6.18
18 Hours 1 Minutes
Output for 5.6.17
6 Hours 1 Minutes
Output for 5.6.16
14 Hours 2 Minutes
Output for 5.5.28, 5.6.15
15 Hours 2 Minutes
Output for 5.6.14
20 Hours 2 Minutes
Output for 5.6.13
21 Hours 2 Minutes
Output for 5.6.11
18 Hours 3 Minutes
Output for 5.6.10
20 Hours 3 Minutes
Output for 5.6.9
1 Hours 3 Minutes
Output for 5.6.8
10 Hours 3 Minutes
Output for 5.5.35
5 Hours 4 Minutes
Output for 5.5.33
12 Hours 1 Minutes
Output for 5.5.32
22 Hours 1 Minutes
Output for 5.5.30
16 Hours 2 Minutes
Output for 5.5.26
23 Hours 3 Minutes
Output for 5.5.25
6 Hours 3 Minutes
Output for 5.5.24
13 Hours 4 Minutes