3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = json_decode('{"template_name":"welcome","subjContext":[],"bodyContext":{"profiles":[{"id":"1","id_user":"1","id_city":"0","id_country":"0","preferences":{"join_reasons":"","age_from":"0","age_to":"0","has_children":"0","more_children":"0","weight_from":"0","weight_to":"0","height_from":"0","height_to":"0","body_type":"","drinks":"0","smokes":"0"},"personal":{"avatar_original":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img11.png","avatar_l":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img2.png","avatar_m":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img10.png","avatar_s":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img4.png","age":0,"birth_day":"30","birth_month":"01","birth_year":"2014","country":"","city":"","name":"Anastasia","gender":"female","height":"0","weight":"0","body_type":"average","marital_status":"not_married","count_children":"0","want_more_children":"0","education":"high_school","religion":"catholicism","occupation":"","drinking":"0","smoking":"0","date_birth":"2014-01-30 07:18:13"},"date_created":"2014-01-30 06:50:33","date_updated":"2014-01-30 06:50:33","is_online":"0"},{"id":"70","id_user":"70","id_city":"0","id_country":"0","preferences":{"join_reasons":"","age_from":"0","age_to":"0","has_children":"0","more_children":"0","weight_from":"0","weight_to":"0","height_from":"0","height_to":"0","body_type":"","drinks":"0","smokes":"0"},"personal":{"avatar_original":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img11.png","avatar_l":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img1.png","avatar_m":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img10.png","avatar_s":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img4.png","age":0,"birth_day":"30","birth_month":"01","birth_year":"2014","country":"","city":"","name":"Daria","gender":"female","height":"0","weight":"0","body_type":"average","marital_status":"not_married","count_children":"0","want_more_children":"0","education":"high_school","religion":"catholicism","occupation":"","drinking":"0","smoking":"0","date_birth":"2014-01-30 07:18:13"},"date_created":"2014-01-30 06:50:37","date_updated":"2014-01-30 06:50:37","is_online":"0"},{"id":"189","id_user":"189","id_city":"0","id_country":"0","preferences":{"join_reasons":"","age_from":"0","age_to":"0","has_children":"0","more_children":"0","weight_from":"0","weight_to":"0","height_from":"0","height_to":"0","body_type":"","drinks":"0","smokes":"0"},"personal":{"avatar_original":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img11.png","avatar_l":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img2.png","avatar_m":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img9.png","avatar_s":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img4.png","age":0,"birth_day":"30","birth_month":"01","birth_year":"2014","country":"","city":"","name":"Marina","gender":"female","height":"0","weight":"0","body_type":"average","marital_status":"not_married","count_children":"0","want_more_children":"0","education":"high_school","religion":"catholicism","occupation":"","drinking":"0","smoking":"0","date_birth":"2014-01-30 07:18:13"},"date_created":"2014-01-30 06:50:45","date_updated":"2014-01-30 06:50:45","is_online":"0"},{"id":"11","id_user":"11","id_city":"0","id_country":"0","preferences":{"join_reasons":"","age_from":"0","age_to":"0","has_children":"0","more_children":"0","weight_from":"0","weight_to":"0","height_from":"0","height_to":"0","body_type":"","drinks":"0","smokes":"0"},"personal":{"avatar_original":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img11.png","avatar_l":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img1.png","avatar_m":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img10.png","avatar_s":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img4.png","age":0,"birth_day":"30","birth_month":"01","birth_year":"2014","country":"","city":"","name":"Dasha","gender":"female","height":"0","weight":"0","body_type":"average","marital_status":"not_married","count_children":"0","want_more_children":"0","education":"high_school","religion":"catholicism","occupation":"","drinking":"0","smoking":"0","date_birth":"2014-01-30 07:18:13"},"date_created":"2014-01-30 06:50:34","date_updated":"2014-01-30 06:50:34","is_online":"0"},{"id":"47","id_user":"47","id_city":"0","id_country":"0","preferences":{"join_reasons":"","age_from":"0","age_to":"0","has_children":"0","more_children":"0","weight_from":"0","weight_to":"0","height_from":"0","height_to":"0","body_type":"","drinks":"0","smokes":"0"},"personal":{"avatar_original":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img11.png","avatar_l":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img3.png","avatar_m":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img10.png","avatar_s":"http:\/\/dl.dropboxusercontent.com\/u\/52521635\/VictoriaBrides\/i\/for_preview\/img4.png","age":0,"birth_day":"30","birth_month":"01","birth_year":"2014","country":"","city":"","name":"Olga","gender":"female","height":"0","weight":"0","body_type":"average","marital_status":"not_married","count_children":"0","want_more_children":"0","education":"high_school","religion":"catholicism","occupation":"","drinking":"0","smoking":"0","date_birth":"2014-01-30 07:18:13"},"date_created":"2014-01-30 06:50:36","date_updated":"2014-01-30 06:50:36","is_online":"0"}],"userId":"210","password":"test123"}}'); $profiles = $data->bodyContext->profiles; print_r($profiles[0]->personal);
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.5 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
stdClass Object ( [avatar_original] => http://dl.dropboxusercontent.com/u/52521635/VictoriaBrides/i/for_preview/img11.png [avatar_l] => http://dl.dropboxusercontent.com/u/52521635/VictoriaBrides/i/for_preview/img2.png [avatar_m] => http://dl.dropboxusercontent.com/u/52521635/VictoriaBrides/i/for_preview/img10.png [avatar_s] => http://dl.dropboxusercontent.com/u/52521635/VictoriaBrides/i/for_preview/img4.png [age] => 0 [birth_day] => 30 [birth_month] => 01 [birth_year] => 2014 [country] => [city] => [name] => Anastasia [gender] => female [height] => 0 [weight] => 0 [body_type] => average [marital_status] => not_married [count_children] => 0 [want_more_children] => 0 [education] => high_school [religion] => catholicism [occupation] => [drinking] => 0 [smoking] => 0 [date_birth] => 2014-01-30 07:18:13 )
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/QPWPA on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/QPWPA on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/QPWPA on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/QPWPA on line 2

preferences:
274.71 ms | 401 KiB | 339 Q