3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt1 = new DateTimeImmutable('2020-07-19 18:30:00', new DateTimeZone('Europe/Berlin')); $dt2 = new DateTimeImmutable('2020-07-19 16:30:00', new DateTimeZone('UTC')); print_r($dt1->diff($dt2));
Output for git.master_jit, git.master
DateInterval Object ( [y] => -1 [m] => 11 [d] => 30 [h] => 0 [i] => 0 [s] => 0 [f] => 0 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 0 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for rfc.literals
DateInterval Object ( [y] => -1 [m] => 11 [d] => 29 [h] => 24 [i] => 0 [s] => 0 [f] => 0 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 0 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 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:
42.66 ms | 461 KiB | 5 Q