3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nowDate = new \DateTime(); $pickupDate = new \DateTime('2015-12-23'); $diff = $pickupDate->diff($nowDate); $daysUntilPickup = $diff ? $diff->days : 0; var_dump($daysUntilPickup);
based on UbaZE
Output for 5.6.28, 7.0.20 - 7.2.0
int(1)
Output for 7.0.6
int(150)
Output for 7.0.5
int(102)
Output for 7.0.4
int(78)
Output for 7.0.3
int(87)
Output for 7.0.2
int(91)
Output for 7.0.1
int(92)
Output for 7.0.0
int(95)
Output for 5.6.21
int(131)
Output for 5.6.20
int(109)
Output for 5.6.19
int(76)
Output for 5.6.18
int(83)
Output for 5.6.17
int(88)
Output for 5.6.16
int(96)
Output for 5.6.15
int(97)
Output for 5.6.14
int(113)
Output for 5.6.13
int(114)
Output for 5.6.12
int(119)
Output for 5.6.11
int(123)
Output for 5.6.10
int(124)
Output for 5.6.9
int(126)
Output for 5.6.8
int(129)
Output for 5.5.35
int(152)
Output for 5.5.34
int(110)
Output for 5.5.33
int(77)
Output for 5.5.32
int(85)
Output for 5.5.31
int(89)
Output for 5.5.30
int(100)
Output for 5.5.29
int(116)
Output for 5.5.28
int(120)
Output for 5.5.27
int(121)
Output for 5.5.26
int(125)
Output for 5.5.25
int(128)
Output for 5.5.24
int(153)
Output for 5.3.21 - 5.4.45
int(38)