3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match_all('/\{?(.*?):\h*\"(.*?)\"(?:,|\}|$)/', '{varA: "value, A", varB: "value:B", varC: "value C", varD: "value\"D\""}', $matches); foreach($matches[1] as $key => $match) { $arr[] = $match . ' :"' . $matches[2][$key] . '"'; } print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => varA :"value, A" [1] => varB :"value:B" [2] => varC :"value C" [3] => varD :"value\"D\"" )

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:
154.37 ms | 405 KiB | 5 Q