3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime(); $dt->setTime(23,59,59); $dt->setDate(2015,12,11); $interval = $dt->diff(new DateTime()); var_dump($interval->days);
based on V3NQ9
Output for 5.3.20 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
int(8)
Output for 7.0.6
int(143)
Output for 7.0.5
int(113)
Output for 7.0.4
int(89)
Output for 7.0.3
int(97)
Output for 7.0.2
int(102)
Output for 7.0.1
int(103)
Output for 7.0.0
int(106)
Output for 5.6.21
int(142)
Output for 5.6.20
int(120)
Output for 5.6.19
int(87)
Output for 5.6.18
int(94)
Output for 5.6.17
int(99)
Output for 5.6.16
int(107)
Output for 5.6.15
int(108)
Output for 5.6.14
int(124)
Output for 5.6.13
int(125)
Output for 5.6.12
int(130)
Output for 5.6.11
int(134)
Output for 5.6.10
int(135)
Output for 5.6.9
int(137)
Output for 5.6.8
int(140)
Output for 5.5.35
int(163)
Output for 5.5.34
int(121)
Output for 5.5.33
int(88)
Output for 5.5.32
int(96)
Output for 5.5.31
int(100)
Output for 5.5.30
int(111)
Output for 5.5.29
int(127)
Output for 5.5.28
int(131)
Output for 5.5.27
int(132)
Output for 5.5.26
int(136)
Output for 5.5.25
int(139)
Output for 5.5.24
int(164)