3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz = new DateTimeZone("Europe/Zurich"); $dt1 = new Datetime('2019-01-01', $tz); $dt2 = new Datetime('2019-05-01', $tz); echo 'EU/ZU : ' . $dt1->diff($dt2)->format('%a') . ' Days' . PHP_EOL; echo 'EU/ZU : ' . $dt1->diff($dt2)->format('%m') . ' Months' . PHP_EOL . PHP_EOL; $tz = new DateTimeZone("UTC"); $dt1 = new Datetime('2019-01-01', $tz); $dt2 = new Datetime('2019-05-01', $tz); echo 'UTC : ' . $dt1->diff($dt2)->format('%a') . ' Days' . PHP_EOL; echo 'UTC : ' . $dt1->diff($dt2)->format('%m') . ' Months' . PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
EU/ZU : 120 Days EU/ZU : 4 Months UTC : 120 Days UTC : 4 Months

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