3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo json_encode(new \DateTime());
based on 34JYZ
Output for 7.3.0rc3
{"date":"2017-07-11 16:37:34.071890","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.3.0beta1
{"date":"2017-07-11 16:37:34.002687","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.3.0alpha1
{"date":"2017-07-11 16:37:34.004068","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.2.6
{"date":"2017-07-11 16:37:34.004999","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.2.0
{"date":"2017-07-11 16:37:34.023368","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.20
{"date":"2017-07-11 16:37:34.002691","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.10
{"date":"2017-07-11 16:37:34.003656","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.7
{"date":"2017-07-11 16:37:34.008930","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.6
{"date":"2017-07-11 16:37:34.042003","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.5
{"date":"2017-07-11 16:37:34.030551","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.4
{"date":"2017-07-11 16:37:34.028879","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.0.20, 7.1.3
{"date":"2017-07-11 16:37:34.000000","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.2
{"date":"2017-07-11 16:37:34.029867","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.1
{"date":"2017-07-11 16:37:34.006262","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.0
{"date":"2017-07-11 16:37:34.008054","timezone_type":3,"timezone":"Europe\/Amsterdam"}