3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $am = DateTime::createFromFormat('h:i A','1:00 AM'); echo $am->format('d M y H:i'); echo $am->format('d M y h:i A'); $pm = DateTime::createFromFormat('h:i A','1:00 PM'); echo $pm->format('d M y H:i'); echo $pm->format('d M y h:i A');
based on XH1ht
Output for 5.4.8 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
28 Sep 15 01:0028 Sep 15 01:00 AM28 Sep 15 13:0028 Sep 15 01:00 PM
Output for 7.0.6
03 May 16 01:0003 May 16 01:00 AM03 May 16 13:0003 May 16 01:00 PM
Output for 5.6.14, 7.0.5
02 Apr 16 01:0002 Apr 16 01:00 AM02 Apr 16 13:0002 Apr 16 01:00 PM
Output for 7.0.4
10 Mar 16 01:0010 Mar 16 01:00 AM10 Mar 16 13:0010 Mar 16 01:00 PM
Output for 7.0.3
18 Mar 16 01:0018 Mar 16 01:00 AM18 Mar 16 13:0018 Mar 16 01:00 PM
Output for 7.0.2
22 Mar 16 01:0022 Mar 16 01:00 AM22 Mar 16 13:0022 Mar 16 01:00 PM
Output for 7.0.1
23 Mar 16 01:0023 Mar 16 01:00 AM23 Mar 16 13:0023 Mar 16 01:00 PM
Output for 7.0.0
26 Mar 16 01:0026 Mar 16 01:00 AM26 Mar 16 13:0026 Mar 16 01:00 PM
Output for 5.6.21
02 May 16 01:0002 May 16 01:00 AM02 May 16 13:0002 May 16 01:00 PM
Output for 5.6.20
09 Apr 16 01:0009 Apr 16 01:00 AM09 Apr 16 13:0009 Apr 16 01:00 PM
Output for 5.6.19
07 Mar 16 01:0007 Mar 16 01:00 AM07 Mar 16 13:0007 Mar 16 01:00 PM
Output for 5.6.18
14 Mar 16 01:0014 Mar 16 01:00 AM14 Mar 16 13:0014 Mar 16 01:00 PM
Output for 5.6.17
19 Mar 16 01:0019 Mar 16 01:00 AM19 Mar 16 13:0019 Mar 16 01:00 PM
Output for 5.6.16
27 Mar 16 01:0027 Mar 16 01:00 AM27 Mar 16 13:0027 Mar 16 01:00 PM
Output for 5.6.15
28 Mar 16 01:0028 Mar 16 01:00 AM28 Mar 16 13:0028 Mar 16 01:00 PM
Output for 5.6.13
15 Apr 16 01:0015 Apr 16 01:00 AM15 Apr 16 13:0015 Apr 16 01:00 PM
Output for 5.6.12
19 Apr 16 01:0019 Apr 16 01:00 AM19 Apr 16 13:0019 Apr 16 01:00 PM
Output for 5.6.11
23 Apr 16 01:0023 Apr 16 01:00 AM23 Apr 16 13:0023 Apr 16 01:00 PM
Output for 5.6.10
25 Apr 16 01:0025 Apr 16 01:00 AM25 Apr 16 13:0025 Apr 16 01:00 PM
Output for 5.6.9
27 Apr 16 01:0027 Apr 16 01:00 AM27 Apr 16 13:0027 Apr 16 01:00 PM
Output for 5.6.8
29 Apr 16 01:0029 Apr 16 01:00 AM29 Apr 16 13:0029 Apr 16 01:00 PM
Output for 5.6.7
25 May 16 01:0025 May 16 01:00 AM25 May 16 13:0025 May 16 01:00 PM
Output for 5.5.35
22 May 16 01:0022 May 16 01:00 AM22 May 16 13:0022 May 16 01:00 PM
Output for 5.5.34
10 Apr 16 01:0010 Apr 16 01:00 AM10 Apr 16 13:0010 Apr 16 01:00 PM
Output for 5.5.33
08 Mar 16 01:0008 Mar 16 01:00 AM08 Mar 16 13:0008 Mar 16 01:00 PM
Output for 5.5.32
16 Mar 16 01:0016 Mar 16 01:00 AM16 Mar 16 13:0016 Mar 16 01:00 PM
Output for 5.5.31
20 Mar 16 01:0020 Mar 16 01:00 AM20 Mar 16 13:0020 Mar 16 01:00 PM
Output for 5.5.30
31 Mar 16 01:0031 Mar 16 01:00 AM31 Mar 16 13:0031 Mar 16 01:00 PM
Output for 5.5.29
16 Apr 16 01:0016 Apr 16 01:00 AM16 Apr 16 13:0016 Apr 16 01:00 PM
Output for 5.5.28
20 Apr 16 01:0020 Apr 16 01:00 AM20 Apr 16 13:0020 Apr 16 01:00 PM
Output for 5.5.27
21 Apr 16 01:0021 Apr 16 01:00 AM21 Apr 16 13:0021 Apr 16 01:00 PM
Output for 5.5.26
26 Apr 16 01:0026 Apr 16 01:00 AM26 Apr 16 13:0026 Apr 16 01:00 PM
Output for 5.5.25
28 Apr 16 01:0028 Apr 16 01:00 AM28 Apr 16 13:0028 Apr 16 01:00 PM
Output for 5.5.24
23 May 16 01:0023 May 16 01:00 AM23 May 16 13:0023 May 16 01:00 PM
Output for 5.4.2 - 5.4.7
27 Oct 15 01:0027 Oct 15 01:00 AM27 Oct 15 13:0027 Oct 15 01:00 PM
Output for 5.3.18 - 5.3.29
02 Oct 15 01:0002 Oct 15 01:00 AM02 Oct 15 13:0002 Oct 15 01:00 PM