3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $json = '[{ "Name": "LanguageOfficeAddress", "ParamType": "Complex", "Value": { "Parameter": [{ "Name": "LanguageOfficeId", "Type": "Byte", "Value": "2" }, { "Name": "LanguageOfficePhoneNo", "Type": "String", "Value": "003223420718" }] } }, { "Name": "LanguageOfficeAddress", "ParamType": "Complex", "Value": { "Parameter": [{ "Name": "LanguageOfficeId", "Type": "Byte", "Value": "6" }, { "Name": "LanguageOfficePhoneNo", "Type": "String", "Value": "003223420718" }] } }, { "Name": "LanguageOfficeAddress", "ParamType": "Complex", "Value": { "Parameter": [{ "Name": "LanguageOfficeId", "Type": "Byte", "Value": "1" }, { "Name": "LanguageOfficePhoneNo", "Type": "String", "Value": "003223420718" }] } }, { "Name": "LanguageOfficeAddress", "ParamType": "Complex", "Value": { "Parameter": [{ "Name": "LanguageOfficeId", "Type": "Byte", "Value": "5" }, { "Name": "LanguageOfficePhoneNo", "Type": "String", "Value": "+3223420718" }] } }]'; var_dump(json_decode($json, true));
based on iKKrG
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
array(4) { [0]=> array(3) { ["Name"]=> string(21) "LanguageOfficeAddress" ["ParamType"]=> string(7) "Complex" ["Value"]=> array(1) { ["Parameter"]=> array(2) { [0]=> array(3) { ["Name"]=> string(16) "LanguageOfficeId" ["Type"]=> string(4) "Byte" ["Value"]=> string(1) "2" } [1]=> array(3) { ["Name"]=> string(21) "LanguageOfficePhoneNo" ["Type"]=> string(6) "String" ["Value"]=> string(12) "003223420718" } } } } [1]=> array(3) { ["Name"]=> string(21) "LanguageOfficeAddress" ["ParamType"]=> string(7) "Complex" ["Value"]=> array(1) { ["Parameter"]=> array(2) { [0]=> array(3) { ["Name"]=> string(16) "LanguageOfficeId" ["Type"]=> string(4) "Byte" ["Value"]=> string(1) "6" } [1]=> array(3) { ["Name"]=> string(21) "LanguageOfficePhoneNo" ["Type"]=> string(6) "String" ["Value"]=> string(12) "003223420718" } } } } [2]=> array(3) { ["Name"]=> string(21) "LanguageOfficeAddress" ["ParamType"]=> string(7) "Complex" ["Value"]=> array(1) { ["Parameter"]=> array(2) { [0]=> array(3) { ["Name"]=> string(16) "LanguageOfficeId" ["Type"]=> string(4) "Byte" ["Value"]=> string(1) "1" } [1]=> array(3) { ["Name"]=> string(21) "LanguageOfficePhoneNo" ["Type"]=> string(6) "String" ["Value"]=> string(12) "003223420718" } } } } [3]=> array(3) { ["Name"]=> string(21) "LanguageOfficeAddress" ["ParamType"]=> string(7) "Complex" ["Value"]=> array(1) { ["Parameter"]=> array(2) { [0]=> array(3) { ["Name"]=> string(16) "LanguageOfficeId" ["Type"]=> string(4) "Byte" ["Value"]=> string(1) "5" } [1]=> array(3) { ["Name"]=> string(21) "LanguageOfficePhoneNo" ["Type"]=> string(6) "String" ["Value"]=> string(11) "+3223420718" } } } } }