3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = array('in_monitoring' => new DateTime('now', new DateTimeZone('UTC'))); echo json_encode($var); $arr = json_decode($var); print_r($arr);
Output for git.master
{"in_monitoring":{"date":"2015-11-16 17:13:23.003879","timezone_type":3,"timezone":"UTC"}} Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /in/vPfYC:7 Stack trace: #0 /in/vPfYC(7): json_decode(Array) #1 {main} thrown in /in/vPfYC on line 7
Process exited with code 255.
Output for git.master_jit
{"in_monitoring":{"date":"2015-11-16 17:13:23.004353","timezone_type":3,"timezone":"UTC"}} Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /in/vPfYC:7 Stack trace: #0 /in/vPfYC(7): json_decode(Array) #1 {main} thrown in /in/vPfYC on line 7
Process exited with code 255.
Output for rfc.property-hooks
{"in_monitoring":{"date":"2015-11-16 17:13:23.003588","timezone_type":3,"timezone":"UTC"}} Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /in/vPfYC:7 Stack trace: #0 /in/vPfYC(7): json_decode(Array) #1 {main} thrown in /in/vPfYC on line 7
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
56.26 ms | 401 KiB | 8 Q