3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTimeImmutable (); $resultmonth1 = $date->format("n"); $date->modify("next month"); $resultmonth2 = $date->format("n"); var_dump($resultmonth1,$resultmonth2); ?>

preferences:
83.5 ms | 402 KiB | 5 Q