3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dateStr = "(Tue 7:00AM EST)"; $date = \DateTime::createFromFormat("(D g:iA T", $dateStr); var_dump($date);
Output for 5.6.28, 7.0.12 - 7.1.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-01-21 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.5.24 - 5.5.25, 5.6.8 - 5.6.9, 5.6.21, 7.0.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-03 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.5.30, 5.6.14, 7.0.5
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-05 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.6.18, hhvm-3.12.0, 7.0.4
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-15 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.5.31 - 5.5.32, 5.6.17, 7.0.2 - 7.0.3
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-22 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.6.15 - 5.6.16, 7.0.0 - 7.0.1
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-29 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.5.34, 5.6.20
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-12 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.5.33, 5.6.19
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-03-08 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.5.29, 5.6.12 - 5.6.13
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-19 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.5.26 - 5.5.28, 5.6.10 - 5.6.11
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-04-26 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.5.35 - 5.6.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2016-05-24 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.44 - 5.4.45
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-10-27 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.39 - 5.4.43
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-07-14 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.38
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-03-03 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.36 - 5.4.37
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-02-10 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.34 - 5.4.35
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-11-18 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.31 - 5.4.32
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-09-09 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.4.30
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-07-08 07:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.3.6 - 5.3.28, 5.4.0 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-07-08 07:00:00" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }
Output for 5.3.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2014-09-09 07:00:00" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EST" }