3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $Draw_time = "29/01/2016 7pm"; $date = DateTime::createFromFormat("d/m/Y ha",$Draw_time); $new_date = $date->format('Y-m-d H:i:s'); $date2 = new DateTime(); echo $diff = $date2->diff($date)->format("%a days and %H hours and %i minutes and %s seconds");
based on bZKbP
Output for 5.6.28, 7.0.20 - 7.2.0
2 days and 07 hours and 15 minutes and 51 seconds
Output for 7.0.6
112 days and 19 hours and 25 minutes and 14 seconds
Output for 7.0.5
64 days and 15 hours and 17 minutes and 1 seconds
Output for 7.0.4
41 days and 03 hours and 26 minutes and 1 seconds
Output for 7.0.3
49 days and 05 hours and 2 minutes and 31 seconds
Output for 7.0.2
53 days and 11 hours and 9 minutes and 14 seconds
Output for 7.0.1
54 days and 14 hours and 10 minutes and 51 seconds
Output for 7.0.0
57 days and 16 hours and 2 minutes and 26 seconds
Output for 5.6.21
93 days and 22 hours and 12 minutes and 18 seconds
Output for 5.6.20
71 days and 14 hours and 19 minutes and 10 seconds
Output for 5.6.19
38 days and 11 hours and 35 minutes and 26 seconds
Output for 5.6.18
45 days and 20 hours and 36 minutes and 2 seconds
Output for 5.6.17
50 days and 08 hours and 14 minutes and 16 seconds
Output for 5.6.16
58 days and 16 hours and 51 minutes and 37 seconds
Output for 5.6.15
59 days and 17 hours and 41 minutes and 27 seconds
Output for 5.6.14
75 days and 23 hours and 24 minutes and 31 seconds
Output for 5.6.13
77 days and 00 hours and 6 minutes and 19 seconds
Output for 5.6.12
81 days and 14 hours and 35 minutes and 11 seconds
Output for 5.6.11
85 days and 21 hours and 0 minutes and 52 seconds
Output for 5.6.10
86 days and 23 hours and 6 minutes and 16 seconds
Output for 5.6.9
89 days and 04 hours and 35 minutes and 8 seconds
Output for 5.6.8
91 days and 13 hours and 0 minutes and 59 seconds
Output for 5.5.35
114 days and 08 hours and 28 minutes and 19 seconds
Output for 5.5.34
72 days and 16 hours and 33 minutes and 33 seconds
Output for 5.5.33
39 days and 14 hours and 40 minutes and 52 seconds
Output for 5.5.32
48 days and 00 hours and 36 minutes and 40 seconds
Output for 5.5.31
51 days and 11 hours and 24 minutes and 30 seconds
Output for 5.5.30
62 days and 19 hours and 32 minutes and 25 seconds
Output for 5.5.29
78 days and 14 hours and 20 minutes and 53 seconds
Output for 5.5.28
82 days and 17 hours and 55 minutes and 8 seconds
Output for 5.5.27
83 days and 19 hours and 30 minutes and 59 seconds
Output for 5.5.26
88 days and 01 hours and 48 minutes and 39 seconds
Output for 5.5.25
90 days and 09 hours and 16 minutes and 35 seconds
Output for 5.5.24
115 days and 15 hours and 46 minutes and 47 seconds
Output for 5.4.45
2 days and 07 hours and 15 minutes and 47 seconds
Output for 5.4.44
2 days and 07 hours and 15 minutes and 46 seconds
Output for 5.4.43
2 days and 07 hours and 15 minutes and 45 seconds
Output for 5.4.41 - 5.4.42
2 days and 07 hours and 15 minutes and 44 seconds
Output for 5.4.40
2 days and 07 hours and 15 minutes and 43 seconds
Output for 5.4.39
2 days and 07 hours and 15 minutes and 42 seconds
Output for 5.4.37 - 5.4.38
2 days and 07 hours and 15 minutes and 41 seconds
Output for 5.4.34 - 5.4.36
2 days and 07 hours and 15 minutes and 40 seconds
Output for 5.4.32
2 days and 07 hours and 15 minutes and 39 seconds
Output for 5.3.29, 5.4.29 - 5.4.31
2 days and 07 hours and 15 minutes and 38 seconds
Output for 5.4.27 - 5.4.28
2 days and 07 hours and 15 minutes and 37 seconds
Output for 5.4.24 - 5.4.26
2 days and 07 hours and 15 minutes and 36 seconds
Output for 5.3.28, 5.4.23
2 days and 07 hours and 15 minutes and 35 seconds
Output for 5.4.20 - 5.4.22
2 days and 07 hours and 15 minutes and 34 seconds
Output for 5.3.27, 5.4.18 - 5.4.19
2 days and 07 hours and 15 minutes and 33 seconds
Output for 5.3.26, 5.4.15 - 5.4.17
2 days and 07 hours and 15 minutes and 32 seconds
Output for 5.3.23 - 5.3.25, 5.4.12 - 5.4.14
2 days and 07 hours and 15 minutes and 31 seconds
Output for 5.3.22
2 days and 07 hours and 15 minutes and 30 seconds