3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var = array('in_monitoring' => new DateTime('now', new DateTimeZone('UTC'))); $json = json_encode($var); echo $json; $arr = json_decode($json); print_r($arr);
based on vPfYC
Output for 7.2.0
{"in_monitoring":{"date":"2015-11-16 17:14:14.003941","timezone_type":3,"timezone":"UTC"}}stdClass Object ( [in_monitoring] => stdClass Object ( [date] => 2015-11-16 17:14:14.003941 [timezone_type] => 3 [timezone] => UTC ) )
Output for 7.1.10
{"in_monitoring":{"date":"2015-11-16 17:14:14.004514","timezone_type":3,"timezone":"UTC"}}stdClass Object ( [in_monitoring] => stdClass Object ( [date] => 2015-11-16 17:14:14.004514 [timezone_type] => 3 [timezone] => UTC ) )
Output for 7.1.7
{"in_monitoring":{"date":"2015-11-16 17:14:14.003151","timezone_type":3,"timezone":"UTC"}}stdClass Object ( [in_monitoring] => stdClass Object ( [date] => 2015-11-16 17:14:14.003151 [timezone_type] => 3 [timezone] => UTC ) )
Output for 7.1.6
{"in_monitoring":{"date":"2015-11-16 17:14:14.011896","timezone_type":3,"timezone":"UTC"}}stdClass Object ( [in_monitoring] => stdClass Object ( [date] => 2015-11-16 17:14:14.011896 [timezone_type] => 3 [timezone] => UTC ) )
Output for 7.1.5
{"in_monitoring":{"date":"2015-11-16 17:14:14.006586","timezone_type":3,"timezone":"UTC"}}stdClass Object ( [in_monitoring] => stdClass Object ( [date] => 2015-11-16 17:14:14.006586 [timezone_type] => 3 [timezone] => UTC ) )
Output for 7.1.0
{"in_monitoring":{"date":"2015-11-16 17:14:14.004077","timezone_type":3,"timezone":"UTC"}}stdClass Object ( [in_monitoring] => stdClass Object ( [date] => 2015-11-16 17:14:14.004077 [timezone_type] => 3 [timezone] => UTC ) )
Output for 5.5.14 - 7.0.20
{"in_monitoring":{"date":"2015-11-16 17:14:14.000000","timezone_type":3,"timezone":"UTC"}}stdClass Object ( [in_monitoring] => stdClass Object ( [date] => 2015-11-16 17:14:14.000000 [timezone_type] => 3 [timezone] => UTC ) )
Output for 5.5.0 - 5.5.13
{"in_monitoring":{"date":"2015-11-16 17:14:14","timezone_type":3,"timezone":"UTC"}}stdClass Object ( [in_monitoring] => stdClass Object ( [date] => 2015-11-16 17:14:14 [timezone_type] => 3 [timezone] => UTC ) )