3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = DateTimeImmutable::createFromFormat('Ym', '201801', new DateTimeZone('UTC')); var_dump($date);
based on Up93s
Output for 5.6.38 - 7.3.0rc3
object(DateTimeImmutable)#2 (3) { ["date"]=> string(26) "2018-01-31 12:08:09.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" }