3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime(); $date->setTimezone(new DateTimeZone('Europe/Minsk')); echo $date->format('Y-m-d H:i:s'); echo strtotime($date->format('Y-m-d H:i:s')); echo strtotime($date->format('Y-m-d'));
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-09-04 10:47:5514098204751409781600
Output for 7.3.32 - 7.3.33, 8.0.13
2014-09-04 10:47:5514098276751409788800
Output for 7.0.6
2016-05-03 10:41:3814622648981462226400
Output for 7.0.5
2016-04-02 23:33:5214596328321459548000
Output for 7.0.4
2016-03-10 11:06:1314576043731457564400
Output for 7.0.3
2016-03-18 11:43:1314582977931458255600
Output for 7.0.2
2016-03-22 17:37:0314586646231458601200
Output for 7.0.1
2016-03-23 22:22:2814587681481458687600
Output for 7.0.0
2016-03-26 23:55:0414590329041458946800
Output for 5.6.21
2016-05-02 06:03:2114621618011462140000
Output for 5.6.20
2016-04-09 22:30:3914602338391460152800
Output for 5.6.19
2016-03-07 19:14:1814573744581457305200
Output for 5.6.18
2016-03-15 03:08:2514580077051457996400
Output for 5.6.17
2016-03-19 15:58:5214583995321458342000
Output for 5.6.16
2016-03-28 00:40:2914591184291459116000
Output for 5.6.15
2016-03-29 01:45:4114592087411459202400
Output for 5.6.14
2016-04-02 04:06:3414595627941459548000
Output for 5.6.13
2016-04-15 08:00:4414607000441460671200
Output for 5.6.12
2016-04-19 21:45:2414610951241461016800
Output for 5.6.11
2016-04-23 04:49:1314613797531461362400
Output for 5.6.10
2016-04-25 06:32:5814615587781461535200
Output for 5.6.9
2016-04-27 11:31:0314617494631461708000
Output for 5.6.8
2016-04-29 19:35:5514619513551461880800
Output for 5.5.35
2016-05-22 09:46:4114639032011463868000
Output for 5.5.34
2016-04-11 00:50:5814603286581460325600
Output for 5.5.33
2016-03-08 22:11:1514574714751457391600
Output for 5.5.32
2016-03-17 04:51:3614581866961458169200
Output for 5.5.31
2016-03-20 18:44:4014584958801458428400
Output for 5.5.30
2016-04-01 03:41:1814594748781459461600
Output for 5.5.29
2016-04-16 22:06:2014608371801460757600
Output for 5.5.28
2016-04-21 00:50:3514611926351461189600
Output for 5.5.27
2016-04-22 03:20:1214612880121461276000
Output for 5.5.26
2016-04-26 08:59:5014616539901461621600
Output for 5.5.25
2016-04-28 15:17:5414618494741461794400
Output for 5.5.24
2016-05-23 22:38:5214640359321463954400
Output for 5.4.45
2015-09-21 14:11:2014428374801442786400
Output for 5.4.44
2015-09-21 14:11:1314428374731442786400
Output for 5.4.43
2015-09-21 14:11:0514428374651442786400
Output for 5.4.42
2015-09-21 14:11:0314428374631442786400
Output for 5.4.41
2015-09-21 14:10:5914428374591442786400
Output for 5.4.40
2015-09-21 14:10:5614428374561442786400
Output for 5.4.39
2015-09-21 14:10:5314428374531442786400
Output for 5.4.38
2015-03-05 17:25:1014255727101425510000
Output for 5.4.37
2015-03-05 17:25:0314255727031425510000
Output for 5.4.35 - 5.4.36
2015-03-05 17:25:0214255727021425510000
Output for 5.4.34
2015-03-05 17:25:0114255727011425510000
Output for 5.4.15 - 5.4.32
2014-09-04 10:47:5914098204791409781600
Output for 5.3.23 - 5.3.29, 5.4.0 - 5.4.14
2014-09-04 10:48:0014098204801409781600
Output for 5.3.2 - 5.3.22
2014-09-04 10:48:0114098204811409781600
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.1
2014-09-04 10:48:0214098204821409781600
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/52foG 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/52foG 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/52foG on line 3

preferences:
215.87 ms | 401 KiB | 312 Q