3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $json = '{"@attributes":{"type":"3"},"body":{"car":[{"@attributes":{"num":"01","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"3"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"3","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"03","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"4"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"4","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"08","tos_id":"1050","cost":"612.71","ccy":"UAH","car_class":"\u0411","free_count":"1"},"places":[{"@attributes":{"tos_id":"1050","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"612.71","ccy":"UAH"}},{"@attributes":{"tos_id":"1050","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"1","cost":"612.71","ccy":"UAH"}},{"@attributes":{"tos_id":"1050","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"612.71","ccy":"UAH"}},{"@attributes":{"tos_id":"1050","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"612.71","ccy":"UAH"}}]},{"@attributes":{"num":"11","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"2"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"2","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"13","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"1"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"1","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"14","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"6"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"6","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"15","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"4"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"4","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"16","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"7"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"7","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"17","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"3"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"3","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"18","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"6"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"6","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]},{"@attributes":{"num":"19","tos_id":"1040","cost":"223.90","ccy":"UAH","car_class":"\u0411","free_count":"7"},"places":[{"@attributes":{"tos_id":"1040","loc_id":"1001","loc_desc":"\u0416\u0414 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"7","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1002","loc_desc":"\u0416\u0414 \u043d\u0438\u0436\u043d\u0435\u0435 \u043d\u0435 \u0431\u043e\u043a\u043e\u0432\u043e\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1003","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}},{"@attributes":{"tos_id":"1040","loc_id":"1004","loc_desc":"\u0416\u0414 \u0431\u043e\u043a\u043e\u0432\u043e\u0435 \u043d\u0438\u0436\u043d\u0435\u0435","free_count":"0","cost":"223.90","ccy":"UAH"}}]}]}}'; $decoded = json_decode($json); print_r([ $decoded->@attributes, $decoded->body->car[0], ]);
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '@', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/lXMq2 on line 7
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.27
Parse error: syntax error, unexpected '[', expecting ')' in /in/lXMq2 on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ')' in /in/lXMq2 on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/lXMq2 on line 6
Process exited with code 255.