3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array('top_level_data' => array('extension' => array(), 'sub_level_data1' => 0 ) ); $data['top_level_data']['extension'] = (object)$data['top_level_data']['extension']; $data['top_level_data'] = array($data['top_level_data']); echo json_encode($data, JSON_PRETTY_PRINT); $data = array('top_level_data' => array( array('extension' => (object)array(), 'sub_level_data1' => 0 ) ) ); echo json_encode($data, JSON_PRETTY_PRINT);
Output for git.master, git.master_jit, rfc.property-hooks
{ "top_level_data": [ { "extension": {}, "sub_level_data1": 0 } ] }{ "top_level_data": [ { "extension": {}, "sub_level_data1": 0 } ] }

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:
137.15 ms | 406 KiB | 5 Q