3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $informationId = 6; $nodes = json_decode('{"4":{"information_id":"4","bottom":"1","sort_order":"1","status":"1","parent_id":null,"position_header":"0","language_id":"1","title":"\u041e \u043d\u0430\u0441","description":"<p>\r\n\t\u041e \u043d\u0430\u0441<\/p>\r\n","meta_description":"","meta_keyword":"","seo_title":"","seo_h1":"","store_id":"0"},"6":{"information_id":"6","bottom":"1","sort_order":"2","status":"1","parent_id":"4","position_header":"1","language_id":"1","title":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0435","description":"<p>\r\n\t\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0435<\/p>\r\n","meta_description":"","meta_keyword":"","seo_title":"","seo_h1":"","store_id":"0"},"3":{"information_id":"3","bottom":"1","sort_order":"3","status":"1","parent_id":"5","position_header":"0","language_id":"1","title":"\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438","description":"<p>\r\n\t\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/p>\r\n","meta_description":"","meta_keyword":"","seo_title":"","seo_h1":"","store_id":"0"},"5":{"information_id":"5","bottom":"1","sort_order":"4","status":"1","parent_id":"6","position_header":"1","language_id":"1","title":"\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f","description":"<p>\r\n\t\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f<\/p>\r\n","meta_description":"","meta_keyword":"","seo_title":"","seo_h1":"","store_id":"0"}}'); var_dump($nodes);die; $path = array(); $curNode = $nodes[$informationId];
Output for 7.0.0 - 7.1.0
object(stdClass)#2 (4) { ["4"]=> object(stdClass)#1 (14) { ["information_id"]=> string(1) "4" ["bottom"]=> string(1) "1" ["sort_order"]=> string(1) "1" ["status"]=> string(1) "1" ["parent_id"]=> NULL ["position_header"]=> string(1) "0" ["language_id"]=> string(1) "1" ["title"]=> string(9) "О нас" ["description"]=> string(21) "<p> О нас</p> " ["meta_description"]=> string(0) "" ["meta_keyword"]=> string(0) "" ["seo_title"]=> string(0) "" ["seo_h1"]=> string(0) "" ["store_id"]=> string(1) "0" } ["6"]=> object(stdClass)#3 (14) { ["information_id"]=> string(1) "6" ["bottom"]=> string(1) "1" ["sort_order"]=> string(1) "2" ["status"]=> string(1) "1" ["parent_id"]=> string(1) "4" ["position_header"]=> string(1) "1" ["language_id"]=> string(1) "1" ["title"]=> string(40) "Информация о доставке" ["description"]=> string(52) "<p> Информация о доставке</p> " ["meta_description"]=> string(0) "" ["meta_keyword"]=> string(0) "" ["seo_title"]=> string(0) "" ["seo_h1"]=> string(0) "" ["store_id"]=> string(1) "0" } ["3"]=> object(stdClass)#4 (14) { ["information_id"]=> string(1) "3" ["bottom"]=> string(1) "1" ["sort_order"]=> string(1) "3" ["status"]=> string(1) "1" ["parent_id"]=> string(1) "5" ["position_header"]=> string(1) "0" ["language_id"]=> string(1) "1" ["title"]=> string(41) "Политика Безопасности" ["description"]=> string(53) "<p> Политика Безопасности</p> " ["meta_description"]=> string(0) "" ["meta_keyword"]=> string(0) "" ["seo_title"]=> string(0) "" ["seo_h1"]=> string(0) "" ["store_id"]=> string(1) "0" } ["5"]=> object(stdClass)#5 (14) { ["information_id"]=> string(1) "5" ["bottom"]=> string(1) "1" ["sort_order"]=> string(1) "4" ["status"]=> string(1) "1" ["parent_id"]=> string(1) "6" ["position_header"]=> string(1) "1" ["language_id"]=> string(1) "1" ["title"]=> string(35) "Условия соглашения" ["description"]=> string(47) "<p> Условия соглашения</p> " ["meta_description"]=> string(0) "" ["meta_keyword"]=> string(0) "" ["seo_title"]=> string(0) "" ["seo_h1"]=> string(0) "" ["store_id"]=> string(1) "0" } }
Output for 5.2.0 - 5.6.28
object(stdClass)#1 (4) { ["4"]=> object(stdClass)#2 (14) { ["information_id"]=> string(1) "4" ["bottom"]=> string(1) "1" ["sort_order"]=> string(1) "1" ["status"]=> string(1) "1" ["parent_id"]=> NULL ["position_header"]=> string(1) "0" ["language_id"]=> string(1) "1" ["title"]=> string(9) "О нас" ["description"]=> string(21) "<p> О нас</p> " ["meta_description"]=> string(0) "" ["meta_keyword"]=> string(0) "" ["seo_title"]=> string(0) "" ["seo_h1"]=> string(0) "" ["store_id"]=> string(1) "0" } ["6"]=> object(stdClass)#3 (14) { ["information_id"]=> string(1) "6" ["bottom"]=> string(1) "1" ["sort_order"]=> string(1) "2" ["status"]=> string(1) "1" ["parent_id"]=> string(1) "4" ["position_header"]=> string(1) "1" ["language_id"]=> string(1) "1" ["title"]=> string(40) "Информация о доставке" ["description"]=> string(52) "<p> Информация о доставке</p> " ["meta_description"]=> string(0) "" ["meta_keyword"]=> string(0) "" ["seo_title"]=> string(0) "" ["seo_h1"]=> string(0) "" ["store_id"]=> string(1) "0" } ["3"]=> object(stdClass)#4 (14) { ["information_id"]=> string(1) "3" ["bottom"]=> string(1) "1" ["sort_order"]=> string(1) "3" ["status"]=> string(1) "1" ["parent_id"]=> string(1) "5" ["position_header"]=> string(1) "0" ["language_id"]=> string(1) "1" ["title"]=> string(41) "Политика Безопасности" ["description"]=> string(53) "<p> Политика Безопасности</p> " ["meta_description"]=> string(0) "" ["meta_keyword"]=> string(0) "" ["seo_title"]=> string(0) "" ["seo_h1"]=> string(0) "" ["store_id"]=> string(1) "0" } ["5"]=> object(stdClass)#5 (14) { ["information_id"]=> string(1) "5" ["bottom"]=> string(1) "1" ["sort_order"]=> string(1) "4" ["status"]=> string(1) "1" ["parent_id"]=> string(1) "6" ["position_header"]=> string(1) "1" ["language_id"]=> string(1) "1" ["title"]=> string(35) "Условия соглашения" ["description"]=> string(47) "<p> Условия соглашения</p> " ["meta_description"]=> string(0) "" ["meta_keyword"]=> string(0) "" ["seo_title"]=> string(0) "" ["seo_h1"]=> string(0) "" ["store_id"]=> string(1) "0" } }
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/HVK1r on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/HVK1r on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/HVK1r on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/HVK1r on line 5