3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $now = new DateTime('2015-11-09'); $then = new DateTime('2016-03-31'); echo date_diff($now, $then);
Output for 7.1.0 - 7.2.11
Recoverable fatal error: Object of class DateInterval could not be converted to string in /in/S4atk on line 5
Process exited with code 255.
Output for 5.3.19 - 5.6.38, 7.0.0 - 7.0.31
Catchable fatal error: Object of class DateInterval could not be converted to string in /in/S4atk on line 5
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Object of class DateInterval could not be converted to string in /in/S4atk:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.13.2, hhvm-3.17.3 - 3.21.3
Fatal error: Uncaught Error: Object of class DateInterval could not be converted to string in /in/S4atk:5 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Object of class DateInterval could not be converted to string in /in/S4atk:5 Stack trace: #0 {main}
Process exited with code 137.
Output for hhvm-3.10.1 - 3.12.14

Process exited with code 137.