3v4l.org

run code in 500+ 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:
12.57 ms | 483 KiB | 6 Q