3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = new DateTime(); echo json_encode($d);
Output for 7.3.0rc4
{"date":"2014-06-20 04:40:36.003567","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.3.0rc3
{"date":"2014-06-20 04:40:36.002137","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.3.0beta1
{"date":"2014-06-20 04:40:36.001645","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.3.0alpha1
{"date":"2014-06-20 04:40:36.003430","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.2.6
{"date":"2014-06-20 04:40:36.002629","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.2.0
{"date":"2014-06-20 04:40:36.003629","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.20
{"date":"2014-06-20 04:40:36.003535","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.10
{"date":"2014-06-20 04:40:36.003882","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.7
{"date":"2014-06-20 04:40:36.003618","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.6
{"date":"2014-06-20 04:40:36.011598","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.5
{"date":"2014-06-20 04:40:36.012591","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 7.1.0
{"date":"2014-06-20 04:40:36.003969","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 5.4.30 - 5.4.45, 5.5.14 - 7.0.20
{"date":"2014-06-20 04:40:36.000000","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 5.3.0 - 5.4.29, 5.5.0 - 5.5.13
{"date":"2014-06-20 04:40:36","timezone_type":3,"timezone":"Europe\/Amsterdam"}
Output for 5.2.0 - 5.2.17
{}
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/6oIIj on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/6oIIj on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/6oIIj on line 3