3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateWithTimezoneLocation = new \DateTime('now', new \DateTimeZone('Europe/Paris')); $dateWithTimezoneUTCDifference = new \DateTime($dateWithTimezoneLocation->format(\DateTime::ISO8601)); var_dump( $dateWithTimezoneLocation, $dateWithTimezoneUTCDifference, $dateWithTimezoneLocation->getTimezone()->getLocation(), $dateWithTimezoneUTCDifference->getTimezone()->getLocation() );
Output for git.master
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-07 18:10:23.003770" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "Europe/Paris" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-07 18:10:23.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } array(4) { ["country_code"]=> string(2) "FR" ["latitude"]=> float(48.866659999999996) ["longitude"]=> float(2.3333299999999895) ["comments"]=> string(0) "" } bool(false)
Output for git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-07 18:10:23.003798" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "Europe/Paris" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-07 18:10:23.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } array(4) { ["country_code"]=> string(2) "FR" ["latitude"]=> float(48.866659999999996) ["longitude"]=> float(2.3333299999999895) ["comments"]=> string(0) "" } bool(false)
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-07 18:10:23.003528" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "Europe/Paris" } object(DateTime)#2 (3) { ["date"]=> string(26) "2017-07-07 18:10:23.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } array(4) { ["country_code"]=> string(2) "FR" ["latitude"]=> float(48.866659999999996) ["longitude"]=> float(2.3333299999999895) ["comments"]=> string(0) "" } bool(false)

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:
43.05 ms | 402 KiB | 8 Q