3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time = new DateTime(); Locale::setDefault('en_GB'); echo IntlDateFormatter::formatObject($time)."\n"; echo IntlDateFormatter::formatObject($time, [IntlDateFormatter::NONE, IntlDateFormatter::MEDIUM])."\n"; echo IntlDateFormatter::formatObject($time, [IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE])."\n";
based on UdtoX
Output for 7.1.0 - 7.2.0
28 Oct 2015, 14:27:05 14:27:05 28 Oct 2015
Output for 5.6.28, 7.0.20
28 Oct 2015, 14:27:05 14:27:05 20151028 02:27 pm
Output for 7.0.6
3 May 2016, 17:56:37 17:56:37 20160503 05:56 pm
Output for 7.0.5
Fatal error: Uncaught Error: Class 'Locale' not found in /in/9I2Av:4 Stack trace: #0 {main} thrown in /in/9I2Av on line 4
Process exited with code 255.
Output for 7.0.4
10 Mar 2016, 18:09:28 18:09:28 20160310 06:09 pm
Output for 7.0.3
18 Mar 2016, 18:57:35 18:57:35 20160318 06:57 pm
Output for 7.0.2
23 Mar 2016, 01:21:34 01:21:34 20160323 01:21 am
Output for 7.0.1
24 Mar 2016, 05:05:34 05:05:34 20160324 05:05 am
Output for 7.0.0
27 Mar 2016, 07:02:02 07:02:02 20160327 07:02 am
Output for 5.6.21
2 May 2016, 13:07:24 13:07:24 20160502 01:07 pm
Output for 5.5.29 - 5.5.30, 5.5.34, 5.6.13 - 5.6.15, 5.6.20
Fatal error: Class 'Locale' not found in /in/9I2Av on line 4
Process exited with code 255.
Output for 5.6.19
8 Mar 2016, 02:19:36 02:19:36 20160308 02:19 am
Output for 5.6.18
15 Mar 2016, 11:00:55 11:00:55 20160315 11:00 am
Output for 5.6.17
19 Mar 2016, 22:42:11 22:42:11 20160319 10:42 pm
Output for 5.6.16
28 Mar 2016, 07:49:19 07:49:19 20160328 07:49 am
Output for 5.6.12
20 Apr 2016, 05:22:49 05:22:49 20160420 05:22 am
Output for 5.6.11
24 Apr 2016, 11:38:36 11:38:36 20160424 11:38 am
Output for 5.6.10
25 Apr 2016, 13:48:07 13:48:07 20160425 01:48 pm
Output for 5.6.9
27 Apr 2016, 18:57:34 18:57:34 20160427 06:57 pm
Output for 5.6.8
30 Apr 2016, 03:51:04 03:51:04 20160430 03:51 am
Output for 5.5.35
22 May 2016, 19:32:08 19:32:08 20160522 07:32 pm
Output for 5.5.33
9 Mar 2016, 04:56:46 04:56:46 20160309 04:56 am
Output for 5.5.32
17 Mar 2016, 14:39:37 14:39:37 20160317 02:39 pm
Output for 5.5.31
21 Mar 2016, 01:40:58 01:40:58 20160321 01:40 am
Output for 5.5.28
21 Apr 2016, 08:35:50 08:35:50 20160421 08:35 am
Output for 5.5.27
22 Apr 2016, 10:24:45 10:24:45 20160422 10:24 am
Output for 5.5.26
26 Apr 2016, 16:31:06 16:31:06 20160426 04:31 pm
Output for 5.5.25
28 Apr 2016, 23:22:07 23:22:07 20160428 11:22 pm
Output for 5.5.24
24 May 2016, 05:56:58 05:56:58 20160524 05:56 am
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined method IntlDateFormatter::formatObject() in /in/9I2Av on line 5
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/9I2Av on line 6
Process exited with code 255.