3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dateStr = '9:15 pm'; $date = new \DateTime($dateStr); echo $date->format('dS M') . "\n"; echo $date->format('dS F, Y') . "\n"; echo $date->format('h:i A l - dS F, Y') . "\n";
based on 1RA5B
Output for 5.3.0 - 5.4.32, 5.6.28, 7.0.14 - 7.1.0
11th Sep 11th September, 2014 09:15 PM Thursday - 11th September, 2014
Output for 7.0.6
03rd May 03rd May, 2016 09:15 PM Tuesday - 03rd May, 2016
Output for 7.0.5
03rd Apr 03rd April, 2016 09:15 PM Sunday - 03rd April, 2016
Output for 7.0.4
10th Mar 10th March, 2016 09:15 PM Thursday - 10th March, 2016
Output for 7.0.3
18th Mar 18th March, 2016 09:15 PM Friday - 18th March, 2016
Output for 7.0.2
23rd Mar 23rd March, 2016 09:15 PM Wednesday - 23rd March, 2016
Output for 7.0.1
24th Mar 24th March, 2016 09:15 PM Thursday - 24th March, 2016
Output for 7.0.0
27th Mar 27th March, 2016 09:15 PM Sunday - 27th March, 2016
Output for hhvm-3.12.0
13th Mar 13th March, 2016 09:15 PM Sunday - 13th March, 2016
Output for hhvm-3.10.0
31st Mar 31st March, 2016 09:15 PM Thursday - 31st March, 2016
Output for 5.6.21
02nd May 02nd May, 2016 09:15 PM Monday - 02nd May, 2016
Output for 5.6.20
10th Apr 10th April, 2016 09:15 PM Sunday - 10th April, 2016
Output for 5.6.19
08th Mar 08th March, 2016 09:15 PM Tuesday - 08th March, 2016
Output for 5.6.18
15th Mar 15th March, 2016 09:15 PM Tuesday - 15th March, 2016
Output for 5.6.17
19th Mar 19th March, 2016 09:15 PM Saturday - 19th March, 2016
Output for 5.6.16
28th Mar 28th March, 2016 09:15 PM Monday - 28th March, 2016
Output for 5.6.15
29th Mar 29th March, 2016 09:15 PM Tuesday - 29th March, 2016
Output for 5.6.14
02nd Apr 02nd April, 2016 09:15 PM Saturday - 02nd April, 2016
Output for 5.6.13
15th Apr 15th April, 2016 09:15 PM Friday - 15th April, 2016
Output for 5.6.12
20th Apr 20th April, 2016 09:15 PM Wednesday - 20th April, 2016
Output for 5.6.11
24th Apr 24th April, 2016 09:15 PM Sunday - 24th April, 2016
Output for 5.6.10
25th Apr 25th April, 2016 09:15 PM Monday - 25th April, 2016
Output for 5.6.9
27th Apr 27th April, 2016 09:15 PM Wednesday - 27th April, 2016
Output for 5.6.8
30th Apr 30th April, 2016 09:15 PM Saturday - 30th April, 2016
Output for 5.5.35
22nd May 22nd May, 2016 09:15 PM Sunday - 22nd May, 2016
Output for 5.5.34
11th Apr 11th April, 2016 09:15 PM Monday - 11th April, 2016
Output for 5.5.33
09th Mar 09th March, 2016 09:15 PM Wednesday - 09th March, 2016
Output for 5.5.32
17th Mar 17th March, 2016 09:15 PM Thursday - 17th March, 2016
Output for 5.5.31
21st Mar 21st March, 2016 09:15 PM Monday - 21st March, 2016
Output for 5.5.30
01st Apr 01st April, 2016 09:15 PM Friday - 01st April, 2016
Output for 5.5.29
17th Apr 17th April, 2016 09:15 PM Sunday - 17th April, 2016
Output for 5.5.28
21st Apr 21st April, 2016 09:15 PM Thursday - 21st April, 2016
Output for 5.5.27
22nd Apr 22nd April, 2016 09:15 PM Friday - 22nd April, 2016
Output for 5.5.26
26th Apr 26th April, 2016 09:15 PM Tuesday - 26th April, 2016
Output for 5.5.25
28th Apr 28th April, 2016 09:15 PM Thursday - 28th April, 2016
Output for 5.5.24
24th May 24th May, 2016 09:15 PM Tuesday - 24th May, 2016
Output for 5.4.39 - 5.4.45
21st Sep 21st September, 2015 09:15 PM Monday - 21st September, 2015
Output for 5.4.34 - 5.4.38
14th Mar 14th March, 2015 09:15 PM Saturday - 14th March, 2015
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/5ON3U on line 3 11th Sep 11th September, 2014 09:15 PM Thursday - 11th September, 2014
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/5ON3U on line 3 Fatal error: Class 'DateTime' not found in /in/5ON3U on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/5ON3U on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/5ON3U on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/5ON3U on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/5ON3U on line 3