Try it this way. Since the JSON data format is odd, rolling through the returned 'playerStatSummaries' array and acting on the 'playerStatSummaryType' that equals 'RankedSolo5x5' seems like the best future-proof solution:
$claw = "https://euw.api.pvp.net/api/lol/euw/v1.3/stats/by-summoner/43216818/summary?season=SEASON4&api_key=010ba2bc-2c40-4b98-873e-b1d148c9e379";
$z0r = file_get_contents($claw);
$gaza = json_decode($z0r, true);
// Roll through the 'playerStatSummaries' array & act on the 'playerStatSummaryType' that equals 'RankedSolo5x5'.
$wins = '';
foreach ($gaza['playerStatSummaries'] as $key => $value) {
if ($value['playerStatSummaryType'] == 'RankedSolo5x5') {
$wins = $value['wins'];
}
}
// Return the value of `$wins`.
echo $wins;
// Check the output of `$gaza` for debugging.
echo '<pre>';
print_r($gaza);
echo '</pre>';
I also added the print_r($gaza); so you can actually see what data is being returned from the call. Visualizing the output is the best way to debug a process like this.
The structure of the array is shown to be something like this:
Array
(
[summonerId] => 43216818
[playerStatSummaries] => Array
(
[0] => Array
(
[playerStatSummaryType] => AramUnranked5x5
[wins] => 41
[modifyDate] => 1405178930000
[aggregatedStats] => Array
(
[totalChampionKills] => 632
[totalTurretsKilled] => 26
[totalAssists] => 1491
)
)
And the data point you are looking to act on is this:
[5] => Array
(
[playerStatSummaryType] => RankedTeam3x3
[wins] => 4
[losses] => 1
[modifyDate] => 1381833912000
[aggregatedStats] => Array
(
[totalChampionKills] => 33
[totalMinionKills] => 319
[totalTurretsKilled] => 6
[totalNeutralMinionsKilled] => 33
[totalAssists] => 44
)
)