3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ref = new DateTime('2024-01-01 00:00:00', new DateTimeZone('Europe/Berlin')); $t1 = new DateTime('2024-03-31 12:00:00', new DateTimeZone('Europe/Berlin')); $t2 = new DateTime('2024-04-01 12:00:00', new DateTimeZone('Europe/Berlin')); $t3 = new DateTime('2024-10-27 12:00:00', new DateTimeZone('Europe/Berlin')); $t4 = new DateTime('2024-10-28 12:00:00', new DateTimeZone('Europe/Berlin')); // DST start $diff1 = $ref->diff($t1); $diff2 = $ref->diff($t2); // DST end $diff3 = $ref->diff($t3); $diff4 = $ref->diff($t4); echo('DST start' . PHP_EOL); var_dump($diff1->h, $diff2->h); echo('DST end' . PHP_EOL); var_dump($diff3->h, $diff4->h);
Output for git.master_jit, git.master
DST start int(11) int(12) DST end int(12) int(12)

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