3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var = 'time'; $time = $var(); print_r($time); $var = 'DateTime'; $date = $var::createFromFormat('j-M-Y', '15-Feb-2009'); print_r($date);
based on lv6jM
Output for 5.6.28, 7.0.20 - 7.2.0
1446596239DateTime Object ( [date] => 2009-02-15 01:17:19.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.6
1462292075DateTime Object ( [date] => 2009-02-15 18:14:35.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.5
1459658439DateTime Object ( [date] => 2009-02-15 06:40:39.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.4
1457630794DateTime Object ( [date] => 2009-02-15 18:26:34.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.3
1458325975DateTime Object ( [date] => 2009-02-15 19:32:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.2
1458693646DateTime Object ( [date] => 2009-02-15 01:40:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.1
1458793333DateTime Object ( [date] => 2009-02-15 05:22:13.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 7.0.0
1459055919DateTime Object ( [date] => 2009-02-15 07:18:39.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.21
1462188250DateTime Object ( [date] => 2009-02-15 13:24:10.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.20
1460259595DateTime Object ( [date] => 2009-02-15 05:39:55.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.19
1457401037DateTime Object ( [date] => 2009-02-15 02:37:17.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.18
1458037211DateTime Object ( [date] => 2009-02-15 11:20:11.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.17
1458424797DateTime Object ( [date] => 2009-02-15 22:59:57.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.16
1459145156DateTime Object ( [date] => 2009-02-15 08:05:56.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.15
1459234591DateTime Object ( [date] => 2009-02-15 08:56:31.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.14
1459586916DateTime Object ( [date] => 2009-02-15 10:48:36.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.13
1460725889DateTime Object ( [date] => 2009-02-15 15:11:29.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.12
1461123607DateTime Object ( [date] => 2009-02-15 05:40:07.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.11
1461491769DateTime Object ( [date] => 2009-02-15 11:56:09.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.10
1461585938DateTime Object ( [date] => 2009-02-15 14:05:38.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.9
1461777330DateTime Object ( [date] => 2009-02-15 19:15:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.6.8
1461982110DateTime Object ( [date] => 2009-02-15 04:08:30.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.35
1463940106DateTime Object ( [date] => 2009-02-15 20:01:46.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.34
1460353900DateTime Object ( [date] => 2009-02-15 07:51:40.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.33
1457497070DateTime Object ( [date] => 2009-02-15 05:17:50.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.32
1458224048DateTime Object ( [date] => 2009-02-15 15:14:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.31
1458522020DateTime Object ( [date] => 2009-02-15 02:00:20.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.30
1459500616DateTime Object ( [date] => 2009-02-15 10:50:16.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.29
1460864108DateTime Object ( [date] => 2009-02-15 05:35:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.28
1461221615DateTime Object ( [date] => 2009-02-15 08:53:35.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.27
1461314468DateTime Object ( [date] => 2009-02-15 10:41:08.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.26
1461682107DateTime Object ( [date] => 2009-02-15 16:48:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.25
1461879596DateTime Object ( [date] => 2009-02-15 23:39:56.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.5.24
1464099499DateTime Object ( [date] => 2009-02-15 16:18:19.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.38 - 5.4.45
1446596247DateTime Object ( [date] => 2009-02-15 01:17:27.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.30 - 5.4.37
1446596248DateTime Object ( [date] => 2009-02-15 01:17:28.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.28 - 5.4.29
1446596248DateTime Object ( [date] => 2009-02-15 01:17:28 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.18 - 5.4.27
1446596249DateTime Object ( [date] => 2009-02-15 01:17:29 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.4.8 - 5.4.17
1446596250DateTime Object ( [date] => 2009-02-15 01:17:30 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.28 - 5.4.7
1446596251DateTime Object ( [date] => 2009-02-15 01:17:31 [timezone_type] => 3 [timezone] => Europe/Amsterdam )
Output for 5.3.19 - 5.3.27
1446596252DateTime Object ( [date] => 2009-02-15 01:17:32 [timezone_type] => 3 [timezone] => Europe/Amsterdam )