3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '[{ "image": "/b/l/black_10.jpg" }, { "url_key": "printing-products" }, { "position_back": "251,252" }]'; //Using json_decode convert json into array $array = json_decode($json, true); array_walk_recursive($array, function($item, $key) use (&$final_array){$final_array[$key]=$item;}); //Convert into json format echo json_encode($final_array); echo "<pre>"; print_r($final_array); ?>
Output for git.master, git.master_jit, rfc.property-hooks
{"image":"\/b\/l\/black_10.jpg","url_key":"printing-products","position_back":"251,252"}<pre>Array ( [image] => /b/l/black_10.jpg [url_key] => printing-products [position_back] => 251,252 )

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