3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); echo $date->format('U = Y-m-d H:i:s') . "\n"; $date->setTimestamp(1406561202); echo $date->format('U = Y-m-d H:i:s') . "\n"; echo $date->format('\E\X\D\A\T\E;\T\Z\I\D="\C\e\n\t\r\a\l \E\u\ro\p\e S\t\a\n\d\a\r\d \T\i\m\e":Ymd\THis'); ?>
Output for 5.6.28, 7.0.14 - 7.1.0
1406555111 = 2014-07-28 15:45:11 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 7.0.6
1462289306 = 2016-05-03 17:28:26 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 7.0.5
1459655808 = 2016-04-03 05:56:48 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 7.0.4
1457627911 = 2016-03-10 17:38:31 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 7.0.3
1458321970 = 2016-03-18 18:26:10 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 7.0.2
1458690540 = 2016-03-23 00:49:00 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 7.0.1
1458790644 = 2016-03-24 04:37:24 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 7.0.0
1459053244 = 2016-03-27 06:34:04 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.21
1462185515 = 2016-05-02 12:38:35 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.20
1460256924 = 2016-04-10 04:55:24 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.19
1457398051 = 2016-03-08 01:47:31 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.18
1458033706 = 2016-03-15 10:21:46 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.17
1458421919 = 2016-03-19 22:11:59 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.16
1459142483 = 2016-03-28 07:21:23 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.15
1459231950 = 2016-03-29 08:12:30 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.14
1459584419 = 2016-04-02 10:06:59 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.13
1460723231 = 2016-04-15 14:27:11 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.12
1461120889 = 2016-04-20 04:54:49 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.11
1461488971 = 2016-04-24 11:09:31 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.10
1461583226 = 2016-04-25 13:20:26 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.9
1461774582 = 2016-04-27 18:29:42 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.6.8
1461979337 = 2016-04-30 03:22:17 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.35
1463935504 = 2016-05-22 18:45:04 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.34
1460351333 = 2016-04-11 07:08:53 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.33
1457493951 = 2016-03-09 04:25:51 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.32
1458219835 = 2016-03-17 14:03:55 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.31
1458518920 = 2016-03-21 01:08:40 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.30
1459497949 = 2016-04-01 10:05:49 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.29
1460861506 = 2016-04-17 04:51:46 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.28
1461218831 = 2016-04-21 08:07:11 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.27
1461311875 = 2016-04-22 09:57:55 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.26
1461679358 = 2016-04-26 16:02:38 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.25
1461876819 = 2016-04-28 22:53:39 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.5.24
1464060732 = 2016-05-24 05:32:12 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.45
1441833336 = 2015-09-09 23:15:36 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.44
1440876473 = 2015-08-29 21:27:53 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.43
1440876469 = 2015-08-29 21:27:49 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.42
1440876468 = 2015-08-29 21:27:48 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.41
1433677671 = 2015-06-07 13:47:51 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.39 - 5.4.40
1431579920 = 2015-05-14 07:05:20 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.38
1425076779 = 2015-02-27 23:39:39 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.37
1423005204 = 2015-02-04 00:13:24 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.36
1423005203 = 2015-02-04 00:13:23 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.35
1415970650 = 2014-11-14 14:10:50 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.34
1415917362 = 2014-11-13 23:22:42 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.32
1409228750 = 2014-08-28 14:25:50 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.3.29, 5.4.31
1409228749 = 2014-08-28 14:25:49 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.4.21 - 5.4.30
1406555115 = 2014-07-28 15:45:15 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.3.28, 5.4.0 - 5.4.20
1406555116 = 2014-07-28 15:45:16 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.3.7 - 5.3.27
1406555117 = 2014-07-28 15:45:17 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.3.0 - 5.3.6
1406555118 = 2014-07-28 15:45:18 1406561202 = 2014-07-28 17:26:42 EXDATE;TZID="Central Eur2014pe thtandard Time":20140728T172642
Output for 5.2.0 - 5.2.17
1406555118 = 2014-07-28 15:45:18 Fatal error: Call to undefined method DateTime::setTimestamp() in /in/eHfnJ on line 6
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/eHfnJ 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/eHfnJ 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/eHfnJ on line 3