3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo json_encode(['a' => new DateTime()]);
based on uMXRT
Output for 7.2.0
{"a":{"date":"2015-12-20 22:02:12.003648","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 7.1.10
{"a":{"date":"2015-12-20 22:02:12.003809","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 7.1.7
{"a":{"date":"2015-12-20 22:02:12.003834","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 7.1.6
{"a":{"date":"2015-12-20 22:02:12.005237","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 7.1.5
{"a":{"date":"2015-12-20 22:02:12.005732","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 7.1.4
{"a":{"date":"2015-12-20 22:02:12.007261","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 5.5.14 - 5.6.30, 7.0.0 - 7.0.17, 7.0.19 - 7.0.20, 7.1.3
{"a":{"date":"2015-12-20 22:02:12.000000","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 7.1.2
{"a":{"date":"2015-12-20 22:02:12.078780","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 7.1.1
{"a":{"date":"2015-12-20 22:02:12.003491","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for 7.1.0
{"a":{"date":"2015-12-20 22:02:12.084027","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for hhvm-3.10.1 - 3.11.1, hhvm-3.15.4 - 3.17.3, 7.0.18
{"a":{"date":"2015-12-20 22:02:13.000000","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Output for hhvm-3.13.2
{"a":{"date":"2015-12-20 22:02:15.000000","timezone_type":3,"timezone":"Europe\/Amsterdam"}}
Process exited with code 137.
Output for hhvm-3.12.14

Process exited with code 137.
Output for 5.5.0 - 5.5.13
{"a":{"date":"2015-12-20 22:02:12","timezone_type":3,"timezone":"Europe\/Amsterdam"}}