3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime("now"); echo $date->format('Y-m-d\Th:i:s:u \G\M\TO'); echo "\n---\n"; $input = '2020-01-07T11:55:34:438 GMT+0600'; echo $input; echo "\n---\n"; $date = DateTime::createFromFormat('Y-m-d\Th:i:s:u \G\M\TO', $input); echo $date->format('Y-m-d h:i:s'); echo "\n===\n"; var_dump($date);
Output for git.master
2020-01-07T10:12:53:003503 GMT+0100 --- 2020-01-07T11:55:34:438 GMT+0600 --- 2020-01-07 11:55:34 === object(DateTime)#2 (3) { ["date"]=> string(26) "2020-01-07 11:55:34.438000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+06:00" }
Output for git.master_jit
2020-01-07T10:12:53:005213 GMT+0100 --- 2020-01-07T11:55:34:438 GMT+0600 --- 2020-01-07 11:55:34 === object(DateTime)#2 (3) { ["date"]=> string(26) "2020-01-07 11:55:34.438000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+06:00" }
Output for rfc.property-hooks
2020-01-07T10:12:53:003363 GMT+0100 --- 2020-01-07T11:55:34:438 GMT+0600 --- 2020-01-07 11:55:34 === object(DateTime)#2 (3) { ["date"]=> string(26) "2020-01-07 11:55:34.438000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+06:00" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
30.91 ms | 409 KiB | 5 Q