3v4l.org

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

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch master
string(1) "8" string(1) "9"
Output for branch partials
string(1) "8" string(1) "9"
Output for branch literals
string(1) "8" string(1) "9"
Output for branch enumerations
string(1) "8" string(1) "9"

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page