3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dateTime = new \DateTime(); echo json_encode($dateTime);
Output for 7.2.0
{"date":"2015-10-14 18:02:30.037694","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.10
{"date":"2015-10-14 18:02:30.005384","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.7
{"date":"2015-10-14 18:02:30.002962","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.6
{"date":"2015-10-14 18:02:30.011856","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.5
{"date":"2015-10-14 18:02:30.012538","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.0
{"date":"2015-10-14 18:02:30.004074","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 5.6.28, 7.0.20
{"date":"2015-10-14 18:02:30.000000","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 5.4.30 - 5.4.45, 5.5.14 - 5.6.24, 7.0.0 - 7.0.9
{"date":"2015-10-14 18:02:29.000000","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 5.4.0 - 5.4.29, 5.5.0 - 5.5.13
{"date":"2015-10-14 18:02:29","timezone_type":3,"timezone":"Europe\/Amsterdam"}