3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '[{2:,0:1,1:Rodapi\u00e9s 1-a, 2-a, bloque 6}, {4:x, y, z,0 :111, 3:some random text},{5:a45:bc,def}]'; $str = preg_replace('/(?<=[{,])\s*(\d+)\s*:(.*?)(?=}|,\s*\d+\s*:)/', '"$1":"$2"', $str); $obj = json_decode($str); print_r($obj);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => stdClass Object ( [2] => [0] => 1 [1] => RodapiƩs 1-a, 2-a, bloque 6 ) [1] => stdClass Object ( [4] => x, y, z [0] => 111 [3] => some random text ) [2] => stdClass Object ( [5] => a45:bc,def ) )

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