3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt1 = new DateTime('2022-08-01 07:00:00', new DateTimeZone('Europe/Berlin')); $dt2 = new DateTime('2022-08-01 07:00:00 +02:00'); echo "DT1: {$dt1->format('c')}" . PHP_EOL; echo "DT2: {$dt2->format('c')}" . PHP_EOL; $diff = $dt1->diff($dt2); echo "Diff: {$diff->format('%h')}"; //expected "0"
Output for git.master, git.master_jit, rfc.property-hooks
DT1: 2022-08-01T07:00:00+02:00 DT2: 2022-08-01T07:00:00+02:00 Diff: 0

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:
93.14 ms | 405 KiB | 5 Q