3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $now = new DateTime(); echo json_encode($now->format(\DateTime::ISO8601)); $new = new DateTime('2016-01-12T10:25:29+0100'); echo $new->format('dd.mm.yy'); echo json_encode(new DateTime('@1419237113')); $datetime = new DateTime('2014-12-22 08:31:53'); echo $datetime->format('dd.mm.yy');
based on eTOrl
Output for 5.6.28, 7.0.20 - 7.2.0
"2016-01-12T10:26:12+0100"1212.0101.1616{"date":"2014-12-22 08:31:53.000000","timezone_type":1,"timezone":"+00:00"}2222.1212.1414
Output for 5.5.14 - 5.6.24, 7.0.0 - 7.0.9
"2016-01-12T10:26:11+0100"1212.0101.1616{"date":"2014-12-22 08:31:53.000000","timezone_type":1,"timezone":"+00:00"}2222.1212.1414
Output for 5.5.0 - 5.5.13
"2016-01-12T10:26:11+0100"1212.0101.1616{"date":"2014-12-22 08:31:53","timezone_type":1,"timezone":"+00:00"}2222.1212.1414