3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new \DateTime('last day of this month'); var_dump($start->format('m d Y H i s'));
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.6, 5.6.8 - 5.6.13, 5.6.15 - 5.6.22, 5.6.24 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.18, 7.1.20 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
string(19) "12 31 2015 10 54 19"
Output for 7.3.32 - 7.3.33, 8.0.13
string(19) "12 31 2015 09 54 19"
Output for 5.6.7, 5.6.14, 5.6.23, 7.1.19
string(19) "12 31 2015 10 54 20"

preferences:
206.31 ms | 402 KiB | 322 Q