3v4l.org

run code in 300+ PHP versions simultaneously
<?php function NVPToArray($NVPString) { $proArray = array(); while(strlen($NVPString)) { // name $keypos= strpos($NVPString,'='); $keyval = substr($NVPString,0,$keypos); // value $valuepos = strpos($NVPString,'&') ? strpos($NVPString,'&'): strlen($NVPString); $valval = substr($NVPString,$keypos+1,$valuepos-$keypos-1); // decoding the respose $proArray[$keyval] = urldecode($valval); $NVPString = substr($NVPString,$valuepos+1,strlen($NVPString)); } return $proArray; } $array = NVPToArray("BUTTONSOURCE[18]=AngellEYE_PHPClass&VERBOSITY[4]=HIGH"); print_r($array);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [BUTTONSOURCE[18]] => AngellEYE_PHPClass [VERBOSITY[4]] => HIGH )

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:
36.85 ms | 401 KiB | 8 Q