3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! var_dump(DateTime::createFromFormat('Y-m-d\\TH:i:s\\Z', '1970-02-01T18:00:00Z')->format('Y-m-d\\TH:i:s\\Z')); var_dump(DateTime::createFromFormat('Y-m-d\\TH:i:s\\Z', '1970-02-01T18:00:00Z', new DateTimeZone('Europe/London'))->format('Y-m-d\\TH:i:s\\Z'));

preferences:
39.07 ms | 402 KiB | 5 Q