3v4l.org

run code in 300+ PHP versions simultaneously
<?php function oneWeek(\DateTimeInterface $date): \DateTimeInterface { $week = new \DateInterval('P1W'); $inOneWeek = $date->add($week); return $inOneWeek; } $d1 = new \DateTime(); $d2 = new \DateTimeImmutable(); $o1 = oneWeek($d1); $o2 = oneWeek($d2); $f = 'F jS, Y'; echo 'One week from ' . $d1->format($f) . ' is ' . $o1->format($f) . "\n"; echo 'One week from ' . $d2->format($f) . ' is ' . $o2->format($f) . "\n";
Output for git.master_jit, git.master
One week from December 15th, 2025 is December 15th, 2025 One week from December 8th, 2025 is December 15th, 2025

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

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


preferences:
30.19 ms | 405 KiB | 5 Q