3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateWithTimezoneLocation = new \DateTime('now', new \DateTimeZone('Europe/Paris')); $dateWithTimezoneUTCDifference = new \DateTime($d->format(\DateTime::ISO8601)); var_dump($dateWithTimezoneLocation, $dateWithTimezoneUTCDifference, $dateWithTimezoneLocation->getLocation(), $dateWithTimezoneUTCDifference->getLocation()); var_dump($d2);

preferences:
42.07 ms | 402 KiB | 5 Q