3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '{ Success: true, Status: "Ok", Data: { _id: "5b93e0e03ae012046018dc83", lastRefreshDate: "2019-01-22T03:20:55.248Z", nestedLeagueID: "42719", season: { seasonName: "Premier League 18/19", seasonYear: "18/19", seasonID: "4AE95" }, league: { _id: "598a3860a455be173c3f6927", name: "Premier League", leagueID: "42719", regionName: "England", regionFlagName: "england", regionFlagIcon: null, regionID: "426F9", countryID: null, currentSeasonID: "4AE95", hasCompleteCoverage: true }, leagueDetailedInfo: { currentChampion: { teamID: "42719", teamName: "Manchester City" }, titlesRecord: { teamID: "4273D", teamName: "Manchester United", titlesCount: 20 }, roundsCount: 38, averageGoals: 283, averageYellowCards: 320, averageRedCards: 15, homeWinsPercentage: 46, awayWinsPercentage: 35, drawsPercentage: 19, endLeagueDate: "2019-05-13T23:59:00Z", startLeagueDate: "2018-08-10T19:00:00Z", startLeagueTimestamps: 1533927600, endLeagueTimestamps: 1557791940 }, tables: [ { tableName: "Unique League Table", table: [ { teamName: "Liverpool", teamID: "4274F", positionOverall: "1", positionAtHome: "2", positionAtAway: "2", pointsOverall: "60", pointsAtHome: "31", pointsAtAway: "29", playedTotal: "23", winTotal: "19", drawTotal: "3", lossTotal: "1", goalsForTotal: "54", goalsAgainstTotal: "13", goalDifferenceTotal: "+41", playedHome: "11", winHome: "10", drawHome: "1", lossHome: "0", goalsForHome: "31", goalsAgainstHome: "6", goalDifferenceHome: "+25", playedAway: "12", winAway: "9", drawAway: "2", lossAway: "1", goalsForAway: "23", goalsAgainstAway: "7", goalDifferenceAway: "+16" }, { teamName: "Manchester City", teamID: "42719", positionOverall: "2", positionAtHome: "1", positionAtAway: "3", pointsOverall: "56", pointsAtHome: "33", pointsAtAway: "23", playedTotal: "23", winTotal: "18", drawTotal: "2", lossTotal: "3", goalsForTotal: "62", goalsAgainstTotal: "17", goalDifferenceTotal: "+45", playedHome: "12", winHome: "11", drawHome: "0", lossHome: "1", goalsForHome: "40", goalsAgainstHome: "10", goalDifferenceHome: "+30", playedAway: "11", winAway: "7", drawAway: "2", lossAway: "2", goalsForAway: "22", goalsAgainstAway: "7", goalDifferenceAway: "+15" } ] } ] } }'; $decoded = json_decode($data, true); print_r($decoded); var_dump(json_last_error());
Output for 7.1.25, 7.2.0 - 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.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
int(4)
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 int(4)

preferences:
158.22 ms | 402 KiB | 153 Q