3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = new DateTime('NOW'); var_dump($d->format('dS'));
Output for 5.6.9, 5.6.28 - 7.0.0, 7.0.14 - 7.2.0
string(4) "27th"
Output for 7.0.5 - 7.0.6
string(4) "03rd"
Output for 5.6.20, 7.0.4
string(4) "10th"
Output for 7.0.3
string(4) "18th"
Output for 7.0.2
string(4) "23rd"
Output for 5.5.24, 5.6.11, 7.0.1
string(4) "24th"
Output for 5.6.14, 5.6.21
string(4) "02nd"
Output for 5.6.19
string(4) "08th"
Output for 5.6.13, 5.6.18
string(4) "15th"
Output for 5.6.17
string(4) "19th"
Output for 5.6.16
string(4) "28th"
Output for 5.5.25, 5.6.15
string(4) "29th"
Output for 5.2.0 - 5.4.45, 5.6.12
string(4) "20th"
Output for 5.6.10
string(4) "25th"
Output for 5.6.8
string(4) "30th"
Output for 5.5.27, 5.5.35
string(4) "22nd"
Output for 5.5.34
string(4) "11th"
Output for 5.5.33
string(4) "09th"
Output for 5.5.29, 5.5.32
string(4) "17th"
Output for 5.5.28, 5.5.31
string(4) "21st"
Output for 5.5.30
string(4) "01st"
Output for 5.5.26
string(4) "26th"
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/JTC8X on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/JTC8X on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/JTC8X on line 2