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"; Locale::setDefault('no_NO'); 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 9I2Av
Output for 7.1.0 - 7.2.0
28 Oct 2015, 14:27:24 14:27:24 28 Oct 2015 28. okt. 2015, 14:27:24 14:27:24 28. okt. 2015
Output for 7.0.20
28 Oct 2015, 14:27:24 14:27:24 20151028 02:27 pm 28. okt. 2015, 14:27:24 14:27:24 20151028 02:27 p.m.
Output for 7.0.6
3 May 2016, 17:56:38 17:56:38 20160503 05:56 pm 3. mai 2016, 17.56.38 17.56.38 20160503 05:56 p.m.
Output for 7.0.5
Fatal error: Uncaught Error: Class 'Locale' not found in /in/F5j8R:4 Stack trace: #0 {main} thrown in /in/F5j8R 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 10. mar. 2016, 18.09.28 18.09.28 20160310 06:09 p.m.
Output for 7.0.3
18 Mar 2016, 18:57:35 18:57:35 20160318 06:57 pm 18. mar. 2016, 18.57.35 18.57.35 20160318 06:57 p.m.
Output for 7.0.2
23 Mar 2016, 01:21:35 01:21:35 20160323 01:21 am 23. mar. 2016, 01.21.35 01.21.35 20160323 01:21 a.m.
Output for 7.0.1
24 Mar 2016, 05:05:34 05:05:34 20160324 05:05 am 24. mar. 2016, 05.05.34 05.05.34 20160324 05:05 a.m.
Output for 7.0.0
27 Mar 2016, 07:02:03 07:02:03 20160327 07:02 am 27. mar. 2016, 07.02.03 07.02.03 20160327 07:02 a.m.
Output for 5.6.28
28 Oct 2015, 14:27:24 14:27:24 20151028 02:27 pm 28. okt. 2015, 14.27.24 14.27.24 20151028 02:27 p.m.
Output for 5.6.21
2 May 2016, 13:07:25 13:07:25 20160502 01:07 pm 2. mai 2016, 13.07.25 13.07.25 20160502 01:07 p.m.
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/F5j8R 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 8. mar. 2016, 02.19.36 02.19.36 20160308 02:19 a.m.
Output for 5.6.18
15 Mar 2016, 11:00:56 11:00:56 20160315 11:00 am 15. mar. 2016, 11.00.56 11.00.56 20160315 11:00 a.m.
Output for 5.6.17
19 Mar 2016, 22:42:11 22:42:11 20160319 10:42 pm 19. mar. 2016, 22.42.11 22.42.11 20160319 10:42 p.m.
Output for 5.6.16
28 Mar 2016, 07:49:19 07:49:19 20160328 07:49 am 28. mar. 2016, 07.49.19 07.49.19 20160328 07:49 a.m.
Output for 5.6.12
20 Apr 2016, 05:22:50 05:22:50 20160420 05:22 am 20. apr. 2016, 05.22.50 05.22.50 20160420 05:22 a.m.
Output for 5.6.11
24 Apr 2016, 11:38:37 11:38:37 20160424 11:38 am 24. apr. 2016, 11.38.37 11.38.37 20160424 11:38 a.m.
Output for 5.6.10
25 Apr 2016, 13:48:07 13:48:07 20160425 01:48 pm 25. apr. 2016, 13.48.07 13.48.07 20160425 01:48 p.m.
Output for 5.6.9
27 Apr 2016, 18:57:35 18:57:35 20160427 06:57 pm 27. apr. 2016, 18.57.35 18.57.35 20160427 06:57 p.m.
Output for 5.6.8
30 Apr 2016, 03:51:04 03:51:04 20160430 03:51 am 30. apr. 2016, 03.51.04 03.51.04 20160430 03:51 a.m.
Output for 5.5.35
22 May 2016, 19:32:09 19:32:09 20160522 07:32 pm 22. mai 2016, 19.32.09 19.32.09 20160522 07:32 p.m.
Output for 5.5.33
9 Mar 2016, 04:56:46 04:56:46 20160309 04:56 am 9. mar. 2016, 04.56.46 04.56.46 20160309 04:56 a.m.
Output for 5.5.32
17 Mar 2016, 14:39:37 14:39:37 20160317 02:39 pm 17. mar. 2016, 14.39.37 14.39.37 20160317 02:39 p.m.
Output for 5.5.31
21 Mar 2016, 01:40:59 01:40:59 20160321 01:40 am 21. mar. 2016, 01.40.59 01.40.59 20160321 01:40 a.m.
Output for 5.5.28
21 Apr 2016, 08:35:50 08:35:50 20160421 08:35 am 21. apr. 2016, 08.35.50 08.35.50 20160421 08:35 a.m.
Output for 5.5.27
22 Apr 2016, 10:24:45 10:24:45 20160422 10:24 am 22. apr. 2016, 10.24.45 10.24.45 20160422 10:24 a.m.
Output for 5.5.26
26 Apr 2016, 16:31:07 16:31:07 20160426 04:31 pm 26. apr. 2016, 16.31.07 16.31.07 20160426 04:31 p.m.
Output for 5.5.25
28 Apr 2016, 23:22:08 23:22:08 20160428 11:22 pm 28. apr. 2016, 23.22.08 23.22.08 20160428 11:22 p.m.
Output for 5.5.24
24 May 2016, 05:56:59 05:56:59 20160524 05:56 am 24. mai 2016, 05.56.59 05.56.59 20160524 05:56 a.m.
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined method IntlDateFormatter::formatObject() in /in/F5j8R on line 5
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/F5j8R on line 6
Process exited with code 255.