3v4l.org

run code in 200+ PHP versions simultaneously
<?php function f($dt) { echo $dt->format('Y-m-d H:i:s'), "\n"; } f(new DateTimeImmutable('Monday next week 13:00')); f(new DateTimeImmutable('Tuesday next week 14:00')); f(new DateTimeImmutable('Wednesday next week 14:00')); f(new DateTimeImmutable('Thursday next week 15:00')); f(new DateTimeImmutable('Friday next week 16:00')); f(new DateTimeImmutable('Saturday next week 17:00')); f(new DateTimeImmutable('Sunday next week 18:00')); f(new DateTimeImmutable());
based on TpSP8
Output for 5.6.0 - 5.6.19, 5.6.21 - 5.6.32, 5.6.34 - 7.0.15, 7.0.17 - 7.4.0
2016-12-05 13:00:00 2016-12-06 14:00:00 2016-12-07 14:00:00 2016-12-08 15:00:00 2016-12-09 16:00:00 2016-12-10 17:00:00 2016-12-11 18:00:00 2016-12-03 14:16:00
Output for 5.6.20, 5.6.33, 7.0.16
2016-12-05 13:00:00 2016-12-06 14:00:00 2016-12-07 14:00:00 2016-12-08 15:00:00 2016-12-09 16:00:00 2016-12-10 17:00:00 2016-12-11 18:00:00 2016-12-03 14:16:01