3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Asia/Tokyo'); $datetime = new DateTime('now'); $array = array( 'datetime' => $datetime ); echo json_encode($array); $json = json_encode($array); $des = json_decode($json); echo $des['datetime']->format('Y-m-d');
Output for git.master
{"datetime":{"date":"2014-01-14 16:01:01.003586","timezone_type":3,"timezone":"Asia\/Tokyo"}} Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/CjRia:15 Stack trace: #0 {main} thrown in /in/CjRia on line 15
Process exited with code 255.
Output for git.master_jit
{"datetime":{"date":"2014-01-14 16:01:01.003760","timezone_type":3,"timezone":"Asia\/Tokyo"}} Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/CjRia:15 Stack trace: #0 {main} thrown in /in/CjRia on line 15
Process exited with code 255.
Output for rfc.property-hooks
{"datetime":{"date":"2014-01-14 16:01:01.005645","timezone_type":3,"timezone":"Asia\/Tokyo"}} Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/CjRia:15 Stack trace: #0 {main} thrown in /in/CjRia on line 15
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:
46.1 ms | 401 KiB | 8 Q