3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('GMT'); function runTest($a) { print "Before: " . $a->getTimestamp() . "\n"; $b = $a->modify('+1 day'); print "Result after: " . $b->getTimestamp() . "\n"; print "Original after: " . $a->getTimestamp() . "\n"; } print "Immutable:\n"; runTest(new DateTimeImmutable('12/12/2012 12:12:12')); print "\n\nStandard:\n"; runTest(new DateTime('12/12/2012 12:12:12'));
Output for git.master, git.master_jit, rfc.property-hooks
Immutable: Before: 1355314332 Result after: 1355400732 Original after: 1355314332 Standard: Before: 1355314332 Result after: 1355400732 Original after: 1355400732

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:
36.1 ms | 401 KiB | 8 Q