3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $today = new DateTime("now"); $date_end = new DateTime('2016-12-15'); $interval = $today->diff($date_end); echo $interval->days;
based on mi2fZ
Output for 5.3.20 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
365
Output for 7.0.6
207
Output for 7.0.5
255
Output for 7.0.4
279
Output for 7.0.3
271
Output for 7.0.2
266
Output for 7.0.1
265
Output for 7.0.0
262
Output for 5.6.21
226
Output for 5.6.20
248
Output for 5.6.19
281
Output for 5.6.18
274
Output for 5.6.17
269
Output for 5.6.16
261
Output for 5.6.15
260
Output for 5.6.14
244
Output for 5.6.13
243
Output for 5.6.12
238
Output for 5.6.11
234
Output for 5.6.10
233
Output for 5.6.9
231
Output for 5.6.8
228
Output for 5.5.35
205
Output for 5.5.34
247
Output for 5.5.33
280
Output for 5.5.32
272
Output for 5.5.31
268
Output for 5.5.30
257
Output for 5.5.29
241
Output for 5.5.28
237
Output for 5.5.27
236
Output for 5.5.26
232
Output for 5.5.25
229
Output for 5.5.24
204