3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstDayNextMonth = date('Y-m-01', strtotime('first day of this month + 2 months', time())); echo $firstDayNextMonth;

preferences:
33.71 ms | 402 KiB | 5 Q