3v4l.org

run code in 300+ 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());
Output for 5.6.0 - 5.6.19, 5.6.21 - 5.6.32, 5.6.34 - 5.6.38, 7.0.0 - 7.0.15, 7.0.17 - 7.0.33, 7.1.0 - 7.1.25, 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.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
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 7.3.32 - 7.3.33, 8.0.13
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 13: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

preferences:
232.61 ms | 401 KiB | 251 Q