3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo date_diff("2013-01-04","2013-01-01");
Output for 5.5.8 - 5.6.30, 7.0.0 - 7.2.0
Warning: date_diff() expects parameter 1 to be DateTimeInterface, string given in /in/ekXOm on line 3
Output for hhvm-3.11.1 - 3.17.3
Fatal error: Uncaught TypeError: Argument 1 passed to date_diff() must implement interface DateTimeInterface, string given in /in/ekXOm:3 Stack trace: #0 /in/ekXOm(3): date_diff() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Catchable fatal error: Argument 1 passed to date_diff() must implement interface DateTimeInterface, string given in /in/ekXOm on line 3
Process exited with code 255.
Output for 5.3.0 - 5.5.7
Warning: date_diff() expects parameter 1 to be DateTime, string given in /in/ekXOm on line 3