<?php
$dateWithTimezoneLocation = new \DateTime('now', new \DateTimeZone('Europe/Paris'));
$dateWithTimezoneUTCDifference = new \DateTime($dateWithTimezoneLocation->format(\DateTime::ISO8601));
var_dump($dateWithTimezoneLocation, $dateWithTimezoneUTCDifference, $dateWithTimezoneLocation->getLocation(), $dateWithTimezoneUTCDifference->getLocation());
Fatal error: Uncaught Error: Call to undefined method DateTime::getLocation() in /in/F60c2:5
Stack trace:
#0 {main}
thrown in /in/F60c2 on line 5
Process exited with code 255.