@ 2018-06-22T00:38:55Z <?php
$doc=<<<EOT
{
"status":"ok",
"items":[
{
"location":{
"name":"South Korea",
"address":"",
"lat":36,
"lng":128,
"pk":"108278619196284"
}
},
{
"location":{
"name":"Seoul, South Korea",
"address":"",
"lat":37.5689,
"lng":126.977,
"pk":"110272918995512"
}
},
{
"location":{
"name":"Seoul, Korea",
"address":"",
"lat":37.51502,
"lng":127.01648,
"pk":"108259475871818"
}
},
{
"location":{
"name":"Busan, South Korea",
"address":"",
"lat":35.1796,
"lng":129.076,
"pk":"110643562296368"
}
},
{
"location":{
"name":"Gwangju, South Korea",
"address":"",
"lat":35.1547,
"lng":126.916,
"pk":"146676562016844"
}
},
{
"location":{
"name":"Daegu, South Korea",
"address":"",
"lat":35.8223,
"lng":128.6115,
"pk":"102159636493202"
}
},
{
"location":{
"name":"Gangwon-do, South Korea",
"address":"",
"lat":37.7448241535,
"lng":128.230475313,
"pk":"140680839290948"
}
},
{
"location":{
"name":"HelloKittycafe_sinchon",
"address":"\uc11c\ub300\ubb38\uad6c \uba85\ubb3c\uae3836-6",
"lat":37.5513676016,
"lng":126.922082621,
"pk":"1485147221780322"
}
},
{
"location":{
"name":"\uc5d0\ubc84\ub79c\ub4dc (withEverland)",
"address":"\uacbd\uae30\ub3c4 \uc6a9\uc778\uc2dc \ucc98\uc778\uad6c \ud3ec\uace1\uc74d \uc5d0\ubc84\ub79c\ub4dc\ub85c 199, \uacbd\uae30\ub3c4 \uc6a9\uc778",
"lat":37.2928590281,
"lng":127.203179318,
"pk":"182698125088068"
}
},
{
"location":{
"name":"\ub3d9\ub300\ubb38\ub514\uc790\uc778\ud50c\ub77c\uc790 DDP",
"address":"\uc911\uad6c \uc744\uc9c0\ub85c 281, \uc11c\uc6b8",
"lat":37.5670904054,
"lng":127.009630198,
"pk":"124772757536805"
}
},
{
"location":{
"name":"Gwangju",
"address":"",
"lat":35.159494,
"lng":126.851287,
"pk":"103826889656659"
}
}
]
}
EOT;
$location = [];
$doc = json_decode($doc);
foreach($doc->items as $item) {
if (isset($item->location)) {
echo "location: {$item->location}\n";
}
}
unset($item);
var_dump($doc);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit , rfc.property-hooks Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/5PDDU:114
Stack trace:
#0 {main}
thrown in /in/5PDDU on line 114
Process exited with code 255 . This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
32.08 ms | 401 KiB | 8 Q