3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time = new DateTime(); $sub = new DateInterval('PT1H'); $time->sub($sub); echo $time->format('c');
Output for 7.1.20, 7.2.7, 7.3.0beta1 - 7.3.0rc4
2018-07-14T06:12:51+02:00
Output for 5.5.38, 5.6.24 - 5.6.27, 5.6.29 - 5.6.30, hhvm-3.10.1 - 3.15.4, hhvm-3.18.4, hhvm-3.19.2 - 3.20.2, hhvm-3.21.3, 7.0.9 - 7.0.13, 7.0.15 - 7.0.19, 7.0.21 - 7.0.30, 7.1.1 - 7.1.4, 7.1.8 - 7.1.9, 7.1.11 - 7.1.17, 7.2.1 - 7.2.6, 7.3.0alpha1
2018-06-03T04:39:36+02:00
Output for 5.6.28, 7.0.14, 7.0.20, 7.1.0, 7.1.5 - 7.1.7, 7.1.10, 7.2.0
2016-06-02T16:32:25+02:00
Output for 5.3.0 - 5.5.37, 5.6.0 - 5.6.23, 7.0.0 - 7.0.8
2013-02-14T00:59:59+01:00
Output for hhvm-3.17.3, hhvm-3.18.5, hhvm-3.21.0, hhvm-3.22.0
2018-06-03T04:39:37+02:00
Output for 5.2.0 - 5.2.17
Fatal error: Class 'DateInterval' not found in /in/GRjqR on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/GRjqR on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/GRjqR on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/GRjqR on line 2