3v4l.org

run code in 300+ PHP versions simultaneously
;<?php $expiryDate= new DateTime(); $expiryDate->add(new DateInterval('PT600S')); echo $expiryDate->format("Y-m-d H:i:s");
Output for 5.6.28, 7.0.14 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
;2014-11-05 23:28:47
Output for 7.3.32 - 7.3.33, 8.0.13
;2014-11-05 22:28:47
Output for 7.0.6
;2016-05-03 05:55:17
Output for 7.0.5
;2016-04-02 19:00:23
Output for 7.0.4
;2016-03-10 04:56:51
Output for 7.0.3
;2016-03-18 05:18:38
Output for 7.0.2
;2016-03-21 15:46:04
Output for 7.0.1
;2016-03-23 16:22:00
Output for 7.0.0
;2016-03-26 18:08:29
Output for 5.6.21
;2016-05-02 00:59:19
Output for 5.6.20
;2016-04-09 14:16:48
Output for 5.6.19
;2016-03-07 05:01:35
Output for 5.6.18
;2016-03-14 17:58:59
Output for 5.6.17
;2016-03-19 09:42:07
Output for 5.6.16
;2016-03-27 19:54:41
Output for 5.6.15
;2016-03-28 20:47:28
Output for 5.6.14
;2016-04-01 23:18:33
Output for 5.6.13
;2016-04-15 03:19:56
Output for 5.6.12
;2016-04-19 16:48:26
Output for 5.6.11
;2016-04-22 23:44:06
Output for 5.6.10
;2016-04-25 01:36:35
Output for 5.6.9
;2016-04-27 06:37:13
Output for 5.6.8
;2016-04-29 14:28:30
Output for 5.6.7
;2016-05-25 04:19:08
Output for 5.5.35
;2016-05-22 04:46:56
Output for 5.5.34
;2016-04-10 20:13:51
Output for 5.5.33
;2016-03-08 15:52:35
Output for 5.5.32
;2016-03-16 21:45:14
Output for 5.5.31
;2016-03-20 12:32:52
Output for 5.5.30
;2016-03-31 22:48:59
Output for 5.5.29
;2016-04-16 17:25:22
Output for 5.5.28
;2016-04-20 19:51:05
Output for 5.5.27
;2016-04-21 22:09:33
Output for 5.5.26
;2016-04-26 04:00:28
Output for 5.5.25
;2016-04-28 09:58:09
Output for 5.5.24
;2016-05-23 16:50:05
Output for 5.4.45
;2015-10-15 23:24:29
Output for 5.4.42 - 5.4.44
;2015-10-15 23:24:30
Output for 5.4.39 - 5.4.41
;2015-10-15 23:24:31
Output for 5.4.36 - 5.4.38
;2015-10-15 23:24:32
Output for 5.4.32 - 5.4.35
;2015-10-15 23:24:33
Output for 5.4.29 - 5.4.31
;2015-10-15 23:24:34
Output for 5.4.26 - 5.4.28
;2015-10-15 23:24:35
Output for 5.4.23 - 5.4.25
;2015-10-15 23:24:36
Output for 5.4.20 - 5.4.22
;2015-10-15 23:24:37
Output for 5.4.17 - 5.4.19
;2015-10-15 23:24:38
Output for 5.4.12 - 5.4.16
;2015-10-15 23:24:39
Output for 5.4.10 - 5.4.11
;2015-10-15 23:24:40
Output for 5.4.7 - 5.4.9
;2015-10-15 23:24:41
Output for 5.4.4 - 5.4.6
;2015-10-15 23:24:42
Output for 5.4.2 - 5.4.3
;2015-10-15 23:24:43
Output for 5.3.29, 5.4.0 - 5.4.1
;2015-10-15 23:24:44
Output for 5.3.26 - 5.3.28
;2015-10-15 23:24:45
Output for 5.3.23 - 5.3.25
;2015-10-15 23:24:46
Output for 5.3.20 - 5.3.22
;2015-10-15 23:24:47
Output for 5.3.16 - 5.3.19
;2015-10-15 23:24:48
Output for 5.3.12 - 5.3.15
;2015-10-15 23:24:49
Output for 5.3.9 - 5.3.11
;2015-10-15 23:24:50
Output for 5.3.6 - 5.3.8
;2015-10-15 23:24:51
Output for 5.3.3 - 5.3.5
;2015-10-15 23:24:52
Output for 5.3.1 - 5.3.2
;2015-10-15 23:24:53
Output for 5.3.0
;2015-10-15 23:24:54
Output for 5.2.0 - 5.2.17
; Fatal error: Call to undefined method DateTime::add() in /in/eUjTY on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
; Fatal error: Class 'DateTime' not found in /in/eUjTY on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
; Fatal error: Cannot instantiate non-existent class: datetime in /in/eUjTY on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
; Fatal error: Cannot instantiate non-existent class: datetime in /in/eUjTY on line 3

preferences:
228.26 ms | 401 KiB | 313 Q