3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz = new DateTimeZone('Europe/Amsterdam'); $now = new DateTime('2015-10-01', $tz); $then = new DateTime('2015-01-01', $tz); $diff = $now->diff($then); echo sprintf("Expected: %d. Returned: %d\n", 9, $diff->format('%m')); $now = new DateTime('2015-09-01', $tz); $then = new DateTime('2015-01-01', $tz); $diff = $now->diff($then); echo sprintf("Expected: %d. Returned: %d\n", 8, $diff->format('%m')); $now = new DateTime('2015-11-01', $tz); $then = new DateTime('2015-01-01', $tz); $diff = $now->diff($then); echo sprintf("Expected: %d. Returned: %d\n", 10, $diff->format('%m'));
Output for git.master, git.master_jit, rfc.property-hooks
Expected: 9. Returned: 9 Expected: 8. Returned: 8 Expected: 10. Returned: 10

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