3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $runDateTime = new DateTime(); $updatedTime = $runDateTime; $updatedTime = $updatedTime->add(new DateInterval('PT2M')); echo $runDateTime ->format('Y-m-d H:i:s'); echo $updatedTime ->format('Y-m-d H:i:s'); if ($updatedTime > $runDateTime) { echo 3; }
based on IL0vM
Output for 5.6.28, 7.0.14 - 7.1.0
2014-10-16 16:53:552014-10-16 16:53:55
Output for 7.0.6
2016-05-03 10:28:542016-05-03 10:28:54
Output for 7.0.5
2016-04-02 23:14:462016-04-02 23:14:46
Output for 7.0.4
2016-03-10 09:51:252016-03-10 09:51:25
Output for 7.0.3
2016-03-18 10:31:262016-03-18 10:31:26
Output for 7.0.2
2016-03-22 16:29:582016-03-22 16:29:58
Output for 7.0.1
2016-03-23 21:05:072016-03-23 21:05:07
Output for 7.0.0
2016-03-26 22:37:222016-03-26 22:37:22
Output for hhvm-3.12.0
2016-03-12 13:17:222016-03-12 13:17:22
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
2016-05-02 05:48:142016-05-02 05:48:14
Output for 5.6.20
2016-04-09 22:14:262016-04-09 22:14:26
Output for 5.6.19
2016-03-07 17:58:442016-03-07 17:58:44
Output for 5.6.18
2016-03-15 02:05:302016-03-15 02:05:30
Output for 5.6.17
2016-03-19 14:45:032016-03-19 14:45:03
Output for 5.6.16
2016-03-28 00:34:312016-03-28 00:34:31
Output for 5.6.15
2016-03-29 01:29:502016-03-29 01:29:50
Output for 5.6.14
2016-04-02 03:48:432016-04-02 03:48:43
Output for 5.6.13
2016-04-15 07:43:102016-04-15 07:43:10
Output for 5.6.12
2016-04-19 21:31:372016-04-19 21:31:37
Output for 5.6.11
2016-04-23 04:33:352016-04-23 04:33:35
Output for 5.6.10
2016-04-25 06:18:182016-04-25 06:18:18
Output for 5.6.9
2016-04-27 11:17:172016-04-27 11:17:17
Output for 5.6.8
2016-04-29 19:26:012016-04-29 19:26:01
Output for 5.5.35
2016-05-22 09:35:592016-05-22 09:35:59
Output for 5.5.34
2016-04-11 00:34:442016-04-11 00:34:44
Output for 5.5.33
2016-03-08 20:55:392016-03-08 20:55:39
Output for 5.5.32
2016-03-17 03:38:592016-03-17 03:38:59
Output for 5.5.31
2016-03-20 17:30:132016-03-20 17:30:13
Output for 5.5.30
2016-04-01 03:26:342016-04-01 03:26:34
Output for 5.5.29
2016-04-16 21:50:252016-04-16 21:50:25
Output for 5.5.28
2016-04-21 00:47:502016-04-21 00:47:50
Output for 5.5.27
2016-04-22 03:05:332016-04-22 03:05:33
Output for 5.5.26
2016-04-26 08:45:062016-04-26 08:45:06
Output for 5.5.25
2016-04-28 15:03:402016-04-28 15:03:40
Output for 5.5.24
2016-05-24 15:51:022016-05-24 15:51:02
Output for 5.4.45
2015-09-21 15:05:272015-09-21 15:05:27
Output for 5.4.44
2015-09-21 15:05:232015-09-21 15:05:23
Output for 5.4.43
2015-09-21 15:05:182015-09-21 15:05:18
Output for 5.4.42
2015-07-09 09:23:572015-07-09 09:23:57
Output for 5.4.41
2015-07-09 09:23:552015-07-09 09:23:55
Output for 5.4.39 - 5.4.40
2015-07-09 09:23:502015-07-09 09:23:50
Output for 5.4.38
2015-07-09 09:23:492015-07-09 09:23:49
Output for 5.4.37
2015-07-09 09:23:472015-07-09 09:23:47
Output for 5.4.34 - 5.4.36
2015-07-09 09:23:462015-07-09 09:23:46
Output for 5.4.22 - 5.4.32
2014-10-16 16:53:592014-10-16 16:53:59
Output for 5.4.1 - 5.4.21
2014-10-16 16:54:002014-10-16 16:54:00
Output for 5.3.11 - 5.4.0
2014-10-16 16:54:012014-10-16 16:54:01
Output for 5.3.0 - 5.3.10
2014-10-16 16:54:022014-10-16 16:54:02
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::add() in /in/l5BYc on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/l5BYc 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/l5BYc 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/l5BYc on line 2