3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = new \DateTime('last day of this month'); var_dump($start->format('m d Y H i s'));
based on SlD7a
Output for 5.5.0 - 5.6.6, 5.6.8 - 5.6.13, 5.6.15 - 5.6.22, 5.6.24 - 7.1.18, 7.1.20 - 7.3.0
string(19) "12 31 2015 10 54 19"
Output for 5.6.7, 5.6.14, 5.6.23, 7.1.19
string(19) "12 31 2015 10 54 20"
Output for 5.4.44 - 5.4.45
string(19) "12 31 2015 10 54 23"
Output for 5.4.43
string(19) "12 31 2015 10 54 24"
Output for 5.4.41 - 5.4.42
string(19) "12 31 2015 10 54 25"
Output for 5.4.38 - 5.4.40
string(19) "12 31 2015 10 54 26"
Output for 5.4.34 - 5.4.37
string(19) "12 31 2015 10 54 27"
Output for 5.3.29, 5.4.31 - 5.4.32
string(19) "12 31 2015 10 54 28"
Output for 5.4.25 - 5.4.30
string(19) "12 31 2015 10 54 29"
Output for 5.3.28, 5.4.20 - 5.4.24
string(19) "12 31 2015 10 54 30"
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.19
string(19) "12 31 2015 10 54 31"
Output for 5.3.20 - 5.3.25, 5.4.10 - 5.4.15
string(19) "12 31 2015 10 54 32"