3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $now = new DateTime; $created = DateTime::createFromFormat('Y-m-d H:i:s', '2016-01-07 00:00:00'); echo abs($created->diff($now)->days);
based on P3XFd
Output for 5.3.22 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
20
Output for 7.0.6
135
Output for 7.0.5
87
Output for 7.0.4
63
Output for 7.0.3
72
Output for 7.0.2
76
Output for 7.0.1
77
Output for 7.0.0
80
Output for 5.6.21
116
Output for 5.6.20
94
Output for 5.6.19
61
Output for 5.6.18
68
Output for 5.6.17
73
Output for 5.6.16
81
Output for 5.6.15
82
Output for 5.6.14
98
Output for 5.6.13
99
Output for 5.6.12
104
Output for 5.6.11
108
Output for 5.6.10
109
Output for 5.6.9
111
Output for 5.6.8
114
Output for 5.5.35
137
Output for 5.5.34
95
Output for 5.5.33
62
Output for 5.5.32
70
Output for 5.5.31
74
Output for 5.5.30
85
Output for 5.5.29
101
Output for 5.5.28
105
Output for 5.5.27
106
Output for 5.5.26
110
Output for 5.5.25
113
Output for 5.5.24
138