3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $today = new DateTime('today'); $xmas = new DateTime('24 december last year'); $diff = $today->diff($xmas); echo (int)$diff->format('%a');
based on 7LNjf
Output for 5.3.19 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
313
Output for 7.0.6
131
Output for 7.0.5
101
Output for 7.0.4
77
Output for 7.0.3
85
Output for 7.0.2
90
Output for 7.0.1
91
Output for 7.0.0
94
Output for 5.6.21
130
Output for 5.6.20
108
Output for 5.6.19
75
Output for 5.6.18
82
Output for 5.6.17
86
Output for 5.6.16
95
Output for 5.6.15
96
Output for 5.6.14
100
Output for 5.6.13
113
Output for 5.6.12
118
Output for 5.6.11
122
Output for 5.6.10
123
Output for 5.6.9
125
Output for 5.6.8
128
Output for 5.5.35
150
Output for 5.5.34
109
Output for 5.5.33
76
Output for 5.5.32
84
Output for 5.5.31
88
Output for 5.5.30
99
Output for 5.5.29
115
Output for 5.5.28
119
Output for 5.5.27
120
Output for 5.5.26
124
Output for 5.5.25
126
Output for 5.5.24
152