3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $sInserted = '2015-11-17 00:00:00'; $iDiff = (new DateTime($sInserted))->diff(new DateTime())->days; var_dump($iDiff);
Output for 5.4.10 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
int(29)
Output for 7.0.6
int(186)
Output for 7.0.5
int(138)
Output for 7.0.4
int(114)
Output for 7.0.3
int(122)
Output for 7.0.2
int(127)
Output for 7.0.1
int(128)
Output for 7.0.0
int(131)
Output for 5.6.21
int(167)
Output for 5.6.20
int(145)
Output for 5.6.19
int(112)
Output for 5.6.18
int(119)
Output for 5.6.17
int(124)
Output for 5.6.16
int(132)
Output for 5.6.15
int(133)
Output for 5.6.14
int(149)
Output for 5.6.13
int(150)
Output for 5.6.12
int(155)
Output for 5.6.11
int(159)
Output for 5.6.10
int(160)
Output for 5.6.9
int(162)
Output for 5.6.8
int(165)
Output for 5.5.35
int(188)
Output for 5.5.34
int(146)
Output for 5.5.33
int(113)
Output for 5.5.32
int(121)
Output for 5.5.31
int(125)
Output for 5.5.30
int(136)
Output for 5.5.29
int(152)
Output for 5.5.28
int(156)
Output for 5.5.27
int(157)
Output for 5.5.26
int(161)
Output for 5.5.25
int(164)
Output for 5.5.24
int(189)
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/ToPmh on line 4
Process exited with code 255.