3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dateSearch = new DateTime(); $dateSearch->sub(new DateInterval('P3D')); $dateSql = $dateSearch->format('Y-m-d H:i:s'); echo $dateSql; ?>
based on nhf2p
Output for 5.6.28, 7.0.20 - 7.2.0
2015-10-11 12:38:49
Output for 7.0.6
2016-04-30 12:37:32
Output for 7.0.5
2016-03-31 01:21:07
Output for 7.0.4
2016-03-07 12:04:59
Output for 7.0.3
2016-03-15 12:49:46
Output for 7.0.2
2016-03-19 18:47:01
Output for 7.0.1
2016-03-20 23:07:45
Output for 7.0.0
2016-03-24 00:45:07
Output for 5.6.21
2016-04-29 07:49:48
Output for 5.6.20
2016-04-07 00:11:23
Output for 5.6.19
2016-03-04 20:09:07
Output for 5.6.18
2016-03-12 04:41:44
Output for 5.6.17
2016-03-16 16:57:12
Output for 5.6.16
2016-03-25 02:34:47
Output for 5.6.15
2016-03-26 03:30:48
Output for 5.6.14
2016-03-30 05:40:33
Output for 5.6.13
2016-04-12 09:40:25
Output for 5.6.12
2016-04-16 23:39:20
Output for 5.6.11
2016-04-20 06:35:07
Output for 5.6.10
2016-04-22 08:21:59
Output for 5.6.9
2016-04-24 13:26:26
Output for 5.6.8
2016-04-26 21:37:04
Output for 5.5.35
2016-05-19 11:36:14
Output for 5.5.34
2016-04-08 02:32:01
Output for 5.5.33
2016-03-05 23:04:19
Output for 5.5.32
2016-03-14 07:24:03
Output for 5.5.31
2016-03-17 19:40:27
Output for 5.5.30
2016-03-29 05:24:44
Output for 5.5.29
2016-04-13 23:48:44
Output for 5.5.28
2016-04-18 03:00:50
Output for 5.5.27
2016-04-19 05:15:15
Output for 5.5.26
2016-04-23 10:56:34
Output for 5.5.25
2016-04-25 17:21:50
Output for 5.5.24
2016-05-21 00:29:33
Output for 5.4.45
2015-10-11 12:39:00
Output for 5.4.39 - 5.4.44
2015-10-11 12:39:01
Output for 5.4.31 - 5.4.38
2015-10-11 12:39:02
Output for 5.4.25 - 5.4.30
2015-10-11 12:39:03
Output for 5.4.18 - 5.4.24
2015-10-11 12:39:04
Output for 5.4.10 - 5.4.17
2015-10-11 12:39:05
Output for 5.4.8 - 5.4.9
2015-10-11 12:39:06
Output for 5.4.7
2015-10-24 02:04:01
Output for 5.4.6
2015-10-24 03:31:58
Output for 5.4.5
2015-10-24 05:02:15
Output for 5.4.4
2015-10-24 06:39:44
Output for 5.4.3
2015-10-24 08:21:24
Output for 5.4.2
2015-10-24 10:06:05
Output for 5.3.29
2015-10-28 06:08:55
Output for 5.3.28
2015-10-28 08:17:35
Output for 5.3.27
2015-10-30 07:18:42
Output for 5.3.26
2015-10-30 09:19:23
Output for 5.3.25
2015-10-30 10:45:16
Output for 5.3.24
2015-10-30 11:57:46
Output for 5.3.23
2015-10-30 13:33:40
Output for 5.3.22
2015-10-30 15:04:23
Output for 5.3.21
2015-10-30 16:04:35
Output for 5.3.20
2015-10-30 17:05:17
Output for 5.3.19
2015-10-30 17:15:11
Output for 5.3.18
2015-10-30 18:36:34