3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); $date->setTimezone(new DateTimeZone('Europe/Minsk')); echo $date->format('Y-m-d H:i:s'); echo '<br />'; echo strtotime($date->format('Y-m-d H:i:s')); echo '<br />'; echo strtotime($date->format('Y-m-d'));
based on 52foG
Output for 5.6.28, 7.0.14 - 7.1.0
2014-09-04 10:48:18<br />1409820498<br />1409781600
Output for 7.0.6
2016-05-03 18:12:59<br />1462291979<br />1462226400
Output for 7.0.5
2016-04-03 06:41:53<br />1459658513<br />1459634400
Output for 7.0.4
2016-03-10 19:22:56<br />1457634176<br />1457564400
Output for 7.0.3
2016-03-18 20:08:42<br />1458328122<br />1458255600
Output for 7.0.2
2016-03-23 02:22:03<br />1458696123<br />1458687600
Output for 7.0.1
2016-03-24 06:22:04<br />1458796924<br />1458774000
Output for 7.0.0
2016-03-27 07:18:36<br />1459055916<br />1459033200
Output for 5.6.21
2016-05-02 13:23:06<br />1462188186<br />1462140000
Output for 5.6.20
2016-04-10 05:40:17<br />1460259617<br />1460239200
Output for 5.6.19
2016-03-08 03:30:31<br />1457404231<br />1457391600
Output for 5.6.18
2016-03-15 12:02:11<br />1458039731<br />1457996400
Output for 5.6.17
2016-03-19 23:55:06<br />1458428106<br />1458342000
Output for 5.6.16
2016-03-28 08:06:11<br />1459145171<br />1459116000
Output for 5.6.15
2016-03-29 08:57:05<br />1459234625<br />1459202400
Output for 5.6.14
2016-04-02 10:52:13<br />1459587133<br />1459548000
Output for 5.6.13
2016-04-15 15:11:32<br />1460725892<br />1460671200
Output for 5.6.12
2016-04-20 05:38:40<br />1461123520<br />1461103200
Output for 5.6.11
2016-04-24 11:50:10<br />1461491410<br />1461448800
Output for 5.6.10
2016-04-25 14:04:37<br />1461585877<br />1461535200
Output for 5.6.9
2016-04-27 19:13:43<br />1461777223<br />1461708000
Output for 5.6.8
2016-04-30 04:06:30<br />1461981990<br />1461967200
Output for 5.5.35
2016-05-22 19:16:52<br />1463937412<br />1463868000
Output for 5.5.34
2016-04-11 07:53:51<br />1460354031<br />1460325600
Output for 5.5.33
2016-03-09 06:09:38<br />1457500178<br />1457478000
Output for 5.5.32
2016-03-17 15:46:54<br />1458226014<br />1458169200
Output for 5.5.31
2016-03-21 02:50:56<br />1458525056<br />1458514800
Output for 5.5.30
2016-04-01 10:50:17<br />1459500617<br />1459461600
Output for 5.5.29
2016-04-17 05:36:25<br />1460864185<br />1460844000
Output for 5.5.28
2016-04-21 08:50:08<br />1461221408<br />1461189600
Output for 5.5.27
2016-04-22 10:42:50<br />1461314570<br />1461276000
Output for 5.5.26
2016-04-26 16:46:15<br />1461681975<br />1461621600
Output for 5.5.25
2016-04-28 23:37:16<br />1461879436<br />1461794400
Output for 5.5.24
2016-05-24 06:17:42<br />1464063462<br />1464040800
Output for 5.4.45
2015-09-21 14:11:19<br />1442837479<br />1442786400
Output for 5.4.44
2015-09-21 14:11:12<br />1442837472<br />1442786400
Output for 5.4.43
2015-09-21 14:11:05<br />1442837465<br />1442786400
Output for 5.4.42
2015-09-23 05:32:45<br />1442979165<br />1442959200
Output for 5.4.41
2015-09-21 14:10:59<br />1442837459<br />1442786400
Output for 5.4.40
2015-09-21 14:10:56<br />1442837456<br />1442786400
Output for 5.4.39
2015-09-21 14:10:54<br />1442837454<br />1442786400
Output for 5.4.38
2015-03-05 17:26:34<br />1425572794<br />1425510000
Output for 5.4.37
2015-03-05 17:26:26<br />1425572786<br />1425510000
Output for 5.4.35 - 5.4.36
2015-03-05 17:26:25<br />1425572785<br />1425510000
Output for 5.4.34
2015-03-05 17:26:24<br />1425572784<br />1425510000
Output for 5.4.17 - 5.4.32
2014-09-04 10:48:22<br />1409820502<br />1409781600
Output for 5.3.25 - 5.4.16
2014-09-04 10:48:23<br />1409820503<br />1409781600
Output for 5.3.4 - 5.3.24
2014-09-04 10:48:24<br />1409820504<br />1409781600
Output for 5.2.0 - 5.3.3
2014-09-04 10:48:25<br />1409820505<br />1409781600
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/1uhkr on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/1uhkr 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/1uhkr on line 3