3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $json = '{ "id": -1, "name": "All", "children": [ { "id": "default", "name": "default", "isDefault": true, "children": [ { "id": "AUDCAD", "name": "AUDCAD", "leaf": true }, { "id": "AUDCHF", "name": "AUDCHF", "leaf": true }, { "id": "AUDNZD", "name": "AUDNZD", "leaf": true }, { "id": "AUDSGD", "name": "AUDSGD", "leaf": true }, { "id": "AUDUSD", "name": "AUDUSD", "leaf": true }, { "id": "CADCHF", "name": "CADCHF", "leaf": true }, { "id": "CADHKD", "name": "CADHKD", "leaf": true }, { "id": "CADJPY", "name": "CADJPY", "leaf": true }, { "id": "CHFJPY", "name": "CHFJPY", "leaf": true }, { "id": "CHFSGD", "name": "CHFSGD", "leaf": true }, { "id": "EURAUD", "name": "EURAUD", "leaf": true }, { "id": "EURCHF", "name": "EURCHF", "leaf": true }, { "id": "EURDKK", "name": "EURDKK", "leaf": true }, { "id": "EURGBP", "name": "EURGBP", "leaf": true }, { "id": "EURHKD", "name": "EURHKD", "leaf": true }, { "id": "EURJPY", "name": "EURJPY", "leaf": true }, { "id": "EURNOK", "name": "EURNOK", "leaf": true }, { "id": "EURNZD", "name": "EURNZD", "leaf": true }, { "id": "EURPLN", "name": "EURPLN", "leaf": true }, { "id": "EURRUB", "name": "EURRUB", "leaf": true }, { "id": "EURSEK", "name": "EURSEK", "leaf": true }, { "id": "EURSGD", "name": "EURSGD", "leaf": true }, { "id": "EURTRY", "name": "EURTRY", "leaf": true }, { "id": "EURUSD", "name": "EURUSD", "leaf": true }, { "id": "EURZAR", "name": "EURZAR", "leaf": true }, { "id": "GBPAUD", "name": "GBPAUD", "leaf": true }, { "id": "GBPCAD", "name": "GBPCAD", "leaf": true }, { "id": "GBPCHF", "name": "GBPCHF", "leaf": true }, { "id": "GBPJPY", "name": "GBPJPY", "leaf": true }, { "id": "GBPNZD", "name": "GBPNZD", "leaf": true }, { "id": "GBPTRY", "name": "GBPTRY", "leaf": true }, { "id": "GBPUSD", "name": "GBPUSD", "leaf": true }, { "id": "HKDJPY", "name": "HKDJPY", "leaf": true }, { "id": "NZDCAD", "name": "NZDCAD", "leaf": true }, { "id": "NZDCHF", "name": "NZDCHF", "leaf": true }, { "id": "NZDJPY", "name": "NZDJPY", "leaf": true }, { "id": "NZDUSD", "name": "NZDUSD", "leaf": true }, { "id": "SGDJPY", "name": "SGDJPY", "leaf": true }, { "id": "USDCAD", "name": "USDCAD", "leaf": true }, { "id": "USDCHF", "name": "USDCHF", "leaf": true }, { "id": "USDCNH", "name": "USDCNH", "leaf": true }, { "id": "USDDKK", "name": "USDDKK", "leaf": true }, { "id": "USDHKD", "name": "USDHKD", "leaf": true }, { "id": "USDJPY", "name": "USDJPY", "leaf": true }, { "id": "USDMXN", "name": "USDMXN", "leaf": true }, { "id": "USDNOK", "name": "USDNOK", "leaf": true }, { "id": "USDPLN", "name": "USDPLN", "leaf": true }, { "id": "USDRUB", "name": "USDRUB", "leaf": true }, { "id": "USDRUR", "name": "USDRUR", "leaf": true }, { "id": "USDSEK", "name": "USDSEK", "leaf": true }, { "id": "USDSGD", "name": "USDSGD", "leaf": true }, { "id": "USDTRY", "name": "USDTRY", "leaf": true }, { "id": "USDZAR", "name": "USDZAR", "leaf": true }, { "id": "XAGUSD", "name": "XAGUSD", "leaf": true }, { "id": "XAUUSD", "name": "XAUUSD", "leaf": true } ] }, { "id": "\u0442\u0435\u0441\u0442", "name": "\u0442\u0435\u0441\u0442", "isDefault": false, "children": [ { "id": "AUDJPY", "name": "AUDJPY", "leaf": true }, { "id": "EURCAD", "name": "EURCAD", "leaf": true } ] } ], "success": true }'; print_r(json_decode($json,true));
based on m6P62
Output for 5.2.0 - 7.2.0
Array ( [id] => -1 [name] => All [children] => Array ( [0] => Array ( [id] => default [name] => default [isDefault] => 1 [children] => Array ( [0] => Array ( [id] => AUDCAD [name] => AUDCAD [leaf] => 1 ) [1] => Array ( [id] => AUDCHF [name] => AUDCHF [leaf] => 1 ) [2] => Array ( [id] => AUDNZD [name] => AUDNZD [leaf] => 1 ) [3] => Array ( [id] => AUDSGD [name] => AUDSGD [leaf] => 1 ) [4] => Array ( [id] => AUDUSD [name] => AUDUSD [leaf] => 1 ) [5] => Array ( [id] => CADCHF [name] => CADCHF [leaf] => 1 ) [6] => Array ( [id] => CADHKD [name] => CADHKD [leaf] => 1 ) [7] => Array ( [id] => CADJPY [name] => CADJPY [leaf] => 1 ) [8] => Array ( [id] => CHFJPY [name] => CHFJPY [leaf] => 1 ) [9] => Array ( [id] => CHFSGD [name] => CHFSGD [leaf] => 1 ) [10] => Array ( [id] => EURAUD [name] => EURAUD [leaf] => 1 ) [11] => Array ( [id] => EURCHF [name] => EURCHF [leaf] => 1 ) [12] => Array ( [id] => EURDKK [name] => EURDKK [leaf] => 1 ) [13] => Array ( [id] => EURGBP [name] => EURGBP [leaf] => 1 ) [14] => Array ( [id] => EURHKD [name] => EURHKD [leaf] => 1 ) [15] => Array ( [id] => EURJPY [name] => EURJPY [leaf] => 1 ) [16] => Array ( [id] => EURNOK [name] => EURNOK [leaf] => 1 ) [17] => Array ( [id] => EURNZD [name] => EURNZD [leaf] => 1 ) [18] => Array ( [id] => EURPLN [name] => EURPLN [leaf] => 1 ) [19] => Array ( [id] => EURRUB [name] => EURRUB [leaf] => 1 ) [20] => Array ( [id] => EURSEK [name] => EURSEK [leaf] => 1 ) [21] => Array ( [id] => EURSGD [name] => EURSGD [leaf] => 1 ) [22] => Array ( [id] => EURTRY [name] => EURTRY [leaf] => 1 ) [23] => Array ( [id] => EURUSD [name] => EURUSD [leaf] => 1 ) [24] => Array ( [id] => EURZAR [name] => EURZAR [leaf] => 1 ) [25] => Array ( [id] => GBPAUD [name] => GBPAUD [leaf] => 1 ) [26] => Array ( [id] => GBPCAD [name] => GBPCAD [leaf] => 1 ) [27] => Array ( [id] => GBPCHF [name] => GBPCHF [leaf] => 1 ) [28] => Array ( [id] => GBPJPY [name] => GBPJPY [leaf] => 1 ) [29] => Array ( [id] => GBPNZD [name] => GBPNZD [leaf] => 1 ) [30] => Array ( [id] => GBPTRY [name] => GBPTRY [leaf] => 1 ) [31] => Array ( [id] => GBPUSD [name] => GBPUSD [leaf] => 1 ) [32] => Array ( [id] => HKDJPY [name] => HKDJPY [leaf] => 1 ) [33] => Array ( [id] => NZDCAD [name] => NZDCAD [leaf] => 1 ) [34] => Array ( [id] => NZDCHF [name] => NZDCHF [leaf] => 1 ) [35] => Array ( [id] => NZDJPY [name] => NZDJPY [leaf] => 1 ) [36] => Array ( [id] => NZDUSD [name] => NZDUSD [leaf] => 1 ) [37] => Array ( [id] => SGDJPY [name] => SGDJPY [leaf] => 1 ) [38] => Array ( [id] => USDCAD [name] => USDCAD [leaf] => 1 ) [39] => Array ( [id] => USDCHF [name] => USDCHF [leaf] => 1 ) [40] => Array ( [id] => USDCNH [name] => USDCNH [leaf] => 1 ) [41] => Array ( [id] => USDDKK [name] => USDDKK [leaf] => 1 ) [42] => Array ( [id] => USDHKD [name] => USDHKD [leaf] => 1 ) [43] => Array ( [id] => USDJPY [name] => USDJPY [leaf] => 1 ) [44] => Array ( [id] => USDMXN [name] => USDMXN [leaf] => 1 ) [45] => Array ( [id] => USDNOK [name] => USDNOK [leaf] => 1 ) [46] => Array ( [id] => USDPLN [name] => USDPLN [leaf] => 1 ) [47] => Array ( [id] => USDRUB [name] => USDRUB [leaf] => 1 ) [48] => Array ( [id] => USDRUR [name] => USDRUR [leaf] => 1 ) [49] => Array ( [id] => USDSEK [name] => USDSEK [leaf] => 1 ) [50] => Array ( [id] => USDSGD [name] => USDSGD [leaf] => 1 ) [51] => Array ( [id] => USDTRY [name] => USDTRY [leaf] => 1 ) [52] => Array ( [id] => USDZAR [name] => USDZAR [leaf] => 1 ) [53] => Array ( [id] => XAGUSD [name] => XAGUSD [leaf] => 1 ) [54] => Array ( [id] => XAUUSD [name] => XAUUSD [leaf] => 1 ) ) ) [1] => Array ( [id] => тест [name] => тест [isDefault] => [children] => Array ( [0] => Array ( [id] => AUDJPY [name] => AUDJPY [leaf] => 1 ) [1] => Array ( [id] => EURCAD [name] => EURCAD [leaf] => 1 ) ) ) ) [success] => 1 )
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/qesBO on line 308
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/qesBO on line 308
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/qesBO on line 308
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/qesBO on line 308