3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date1 = new DateTime("now"); $date2 = new DateTime("tomorrow"); echo $date1->format('Y-m-d H:i:s'); echo $date2->format('Y-m-d H:i:s');
based on L8IHe
Output for 5.6.28, 7.0.20 - 7.2.0
2015-12-01 04:07:112015-12-02 00:00:00
Output for 7.0.6
2016-05-03 19:51:072016-05-04 00:00:00
Output for 7.0.5
2016-04-03 08:11:042016-04-04 00:00:00
Output for 7.0.4
2016-03-10 20:05:092016-03-11 00:00:00
Output for 7.0.3
2016-03-18 21:26:072016-03-19 00:00:00
Output for 7.0.2
2016-03-23 03:39:562016-03-24 00:00:00
Output for 7.0.1
2016-03-24 06:57:032016-03-25 00:00:00
Output for 7.0.0
2016-03-27 08:51:342016-03-28 00:00:00
Output for 5.6.21
2016-05-02 14:59:072016-05-03 00:00:00
Output for 5.6.20
2016-04-10 07:12:132016-04-11 00:00:00
Output for 5.6.19
2016-03-08 04:17:442016-03-09 00:00:00
Output for 5.6.18
2016-03-15 13:07:482016-03-16 00:00:00
Output for 5.6.17
2016-03-20 00:42:532016-03-21 00:00:00
Output for 5.6.16
2016-03-28 09:40:402016-03-29 00:00:00
Output for 5.6.15
2016-03-29 10:30:242016-03-30 00:00:00
Output for 5.6.14
2016-04-02 12:20:242016-04-03 00:00:00
Output for 5.6.13
2016-04-15 16:51:392016-04-16 00:00:00
Output for 5.6.12
2016-04-20 07:18:292016-04-21 00:00:00
Output for 5.6.11
2016-04-24 13:43:142016-04-25 00:00:00
Output for 5.6.10
2016-04-25 15:47:032016-04-26 00:00:00
Output for 5.6.9
2016-04-27 20:55:282016-04-28 00:00:00
Output for 5.6.8
2016-04-30 05:44:292016-05-01 00:00:00
Output for 5.5.35
2016-05-22 23:54:432016-05-23 00:00:00
Output for 5.5.34
2016-04-11 09:23:362016-04-12 00:00:00
Output for 5.5.33
2016-03-09 07:10:232016-03-10 00:00:00
Output for 5.5.32
2016-03-17 16:59:072016-03-18 00:00:00
Output for 5.5.31
2016-03-21 03:48:172016-03-22 00:00:00
Output for 5.5.30
2016-04-01 12:23:112016-04-02 00:00:00
Output for 5.5.29
2016-04-17 07:09:432016-04-18 00:00:00
Output for 5.5.28
2016-04-21 10:34:172016-04-22 00:00:00
Output for 5.5.27
2016-04-22 12:17:022016-04-23 00:00:00
Output for 5.5.26
2016-04-26 18:27:412016-04-27 00:00:00
Output for 5.5.25
2016-04-29 01:51:002016-04-30 00:00:00
Output for 5.5.24
2016-05-24 08:02:272016-05-25 00:00:00
Output for 5.4.44 - 5.4.45
2015-12-01 04:07:132015-12-02 00:00:00
Output for 5.4.43
2015-12-01 04:07:142015-12-02 00:00:00
Output for 5.4.41 - 5.4.42
2015-12-01 04:07:152015-12-02 00:00:00
Output for 5.4.39 - 5.4.40
2015-12-01 04:07:162015-12-02 00:00:00
Output for 5.4.36 - 5.4.38
2015-12-01 04:07:172015-12-02 00:00:00
Output for 5.4.34 - 5.4.35
2015-12-01 04:07:182015-12-02 00:00:00
Output for 5.3.29, 5.4.29 - 5.4.32
2015-12-01 04:07:192015-12-02 00:00:00
Output for 5.4.25 - 5.4.28
2015-12-01 04:07:202015-12-02 00:00:00
Output for 5.3.28, 5.4.21 - 5.4.24
2015-12-01 04:07:212015-12-02 00:00:00
Output for 5.3.27, 5.4.18 - 5.4.20
2015-12-01 04:07:222015-12-02 00:00:00
Output for 5.3.23 - 5.3.26, 5.4.12 - 5.4.17
2015-12-01 04:07:232015-12-02 00:00:00
Output for 5.3.20 - 5.3.22, 5.4.10 - 5.4.11
2015-12-01 04:07:242015-12-02 00:00:00