3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new \DateTime('today 10:00:00', new \DateTimeZone('Europe/Paris')); //$date->setTime(10,0); $date2 = clone($date); var_dump($date, $date2->setTimeZone(new \DateTimeZone('Europe/London')));
Output for 7.3.0rc3
object(DateTime)#1 (3) { ["date"]=> string(26) "2018-10-30 10:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "Europe/Paris" } object(DateTime)#2 (3) { ["date"]=> string(26) "2018-10-30 09:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" }