3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date_interval = date_diff('2017-06-06', '2017-07-06'); echo intval($date_interval->d);
based on EKTDJ
Output for 7.2.0 - 7.3.0rc3
Warning: date_diff() expects parameter 1 to be DateTimeInterface, string given in /in/iL2Rq on line 3 Notice: Trying to get property 'd' of non-object in /in/iL2Rq on line 4 0
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.20
Warning: date_diff() expects parameter 1 to be DateTimeInterface, string given in /in/iL2Rq on line 3 Notice: Trying to get property of non-object in /in/iL2Rq on line 4 0
Output for hhvm-3.15.4
Fatal error: Uncaught TypeError: Argument 1 passed to date_diff() must implement interface DateTimeInterface, string given in /in/iL2Rq:3 Stack trace: #0 /in/iL2Rq(3): date_diff() #1 {main}
Process exited with code 255.