3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Current: " . date("d.m.y H:i (e)", time()) . " | + 5 hours: " . date("d.m.y H:i (e)", strtotime("+5 hours")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 5 hrs: " . date("d.m.y H:i (e)", strtotime("+5 hrs")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 1 h: " . date("d.m.y H:i (e)", strtotime("+1 h")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 5 h: " . date("d.m.y H:i (e)", strtotime("+5 h")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 1 d: " . date("d.m.y H:i (e)", strtotime("+1 d")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 1 day: " . date("d.m.y H:i (e)", strtotime("+1 day")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 2 days: " . date("d.m.y H:i (e)", strtotime("+2 days")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 1 mon: " . date("d.m.y H:i (e)", strtotime("+1 mon")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 1 month: " . date("d.m.y H:i (e)", strtotime("+1 month")) . "\n" . "Current: " . date("d.m.y H:i (e)", time()) . " | + 2 months: " . date("d.m.y H:i (e)", strtotime("+2 months")) . "\n";
Output for 5.6.0 - 5.6.26, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.0
Current: 01.10.16 01:06 (Europe/Amsterdam) | + 5 hours: 01.10.16 06:06 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 5 hrs: 30.09.16 22:06 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 1 h: 01.10.16 02:06 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 5 h: 30.09.16 22:06 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 1 d: 01.10.16 02:06 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 1 day: 02.10.16 01:06 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 2 days: 03.10.16 01:06 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 1 mon: 03.10.16 00:00 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 1 month: 01.11.16 01:06 (Europe/Amsterdam) Current: 01.10.16 01:06 (Europe/Amsterdam) | + 2 months: 01.12.16 01:06 (Europe/Amsterdam)

preferences:
68.94 ms | 404 KiB | 49 Q