3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $queuedTime = "2011-03-17 06:42:10"; $dateTime = new DateTime(); $dateTime->modify('-2 hours'); $dateTime->modify('-10 minutes'); echo $dateTime->format('H:i'); ?>
Output for 5.2.0 - 5.3.28, 5.4.0 - 5.4.28, 5.6.28, 7.0.14 - 7.1.0
13:07
Output for 7.0.6
05:59
Output for 7.0.5
18:56
Output for 7.0.4
05:13
Output for 7.0.3
05:45
Output for 7.0.2
11:31
Output for 7.0.1
16:32
Output for 7.0.0
18:12
Output for 5.6.21
01:19
Output for 5.6.20
17:47
Output for 5.6.19
13:19
Output for 5.6.18
21:05
Output for 5.6.17
10:04
Output for 5.6.16
19:58
Output for 5.6.15
20:51
Output for 5.6.14
23:25
Output for 5.6.13
03:20
Output for 5.6.12
16:57
Output for 5.6.11
23:57
Output for 5.6.10
01:47
Output for 5.6.9
06:45
Output for 5.6.8
14:45
Output for 5.6.7
09:06
Output for 5.5.35
05:00
Output for 5.5.34
20:13
Output for 5.5.33
16:09
Output for 5.5.32
22:57
Output for 5.5.31
12:51
Output for 5.5.30
22:59
Output for 5.5.29
17:25
Output for 5.5.28
20:03
Output for 5.5.27
22:34
Output for 5.5.26
04:14
Output for 5.5.25
10:17
Output for 5.5.24
17:12
Output for 5.4.39 - 5.4.45
22:29
Output for 5.4.34 - 5.4.38
16:25
Output for 5.3.29, 5.4.29 - 5.4.32
08:30
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/MnrqT on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/MnrqT on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/MnrqT on line 4