3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date("Y-m-01 H:i:s", strtotime("+2 months"));
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0, 7.1.6 - 7.1.25, 7.2.0 - 7.2.2, 7.2.4 - 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-01-01 13:52:37
Output for 7.3.32 - 7.3.33, 8.0.13
2016-01-01 12:52:37
Output for 7.1.5, 7.2.3
2016-01-01 13:52:38

preferences:
198.93 ms | 401 KiB | 236 Q