3v4l.org

run code in 300+ PHP versions simultaneously
<?php $og = new DateTimeImmutable(date('2025-03-31')); $next_month = $og->modify('last day of next month'); echo "Start Date: " . $og->format('Y-m-d') . "\n"; echo "Next Month: " . $next_month->format('Y-m-d');

preferences:
42.07 ms | 404 KiB | 5 Q