3v4l.org

run code in 300+ PHP versions simultaneously
<?php $client_id = "239"; $client_secret = "dbd8a92f126ed1a874218f17329f9432688769b2"; $access_token = "0cd76192710efdd76818141513659835b61a188e"; $redirect_uri = "http://localhost/"; $response_type = "code"; $scope = ""; $approval_prompt = ""; function authorizeUrl($clientId, $response_type, $redirect_uri, $scope, $approval_prompt){ $authorizeUrl = "https://www.strava.com/oauth/authorize?client_id=$clientId&response_type=$response_type&redirect_uri=$redirect_uri&scope=$scope&approval_prompt=$approval_prompt"; return $authorizeUrl; } function parseJason ($response){ return json_decode($response); } function tokenRequest($clientId, $clientSecret, $code){ $oauthFields = array( 'client_id' => $clientId, "client_secret" => $clientSecret, "code" => $code); var_dump($oauthFields); echo "<br>"; echo "<br>" . $oauthFields . "<br>"; print_r($oauthFields); $oauthFieldsObject = (object) $oauthFields; echo "<br>"; var_dump($oauthFieldsObject); echo "<br>"; print_r($oauthFieldsObject); echo "<br>"; $parameters = '&' . http_build_query($oauthFields); var_dump($parameters); echo "<br>". $parameters; echo "<br>"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.strava.com/oauth/token?"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); var_dump($ch); $urlResponse = curl_exec($ch); echo "<br>"; var_dump($urlResponse); $http_response = curl_getinfo($ch, CURLINFO_HTTP_CODE); $http_decoded = json_decode($http_response); echo "<br>" . $http_decoded; curl_close($ch); return json_decode($urlResponse); } echo $client_secret; echo "<br>"; $loginUrl = authorizeUrl($client_id,$response_type,$redirect_uri, $scope, $approval_prompt); echo "<a href='$loginUrl'>Click here<a>". "<br>" ; echo $loginUrl ."<br>"; echo 'https://www.strava.com/oauth/authorize?client_id=239&response_type=code&redirect_uri=http://localhost&approval_prompt=force'."<br>"; $codeUrl = null; if (isset($_GET['code'])){ $codeUrl = $_GET['code']; } else { echo "<a href='$loginUrl'>Click here<a>". "<br>" ; } echo $codeUrl; $buildOauthTokenExchange = "https://wwww.strava.com/oauth/token"; echo "<br>"; $token = tokenRequest($client_id, $client_secret, $codeUrl); echo "<br>"; var_dump($token); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0040.01418.43
8.3.50.0140.00421.20
8.3.40.0060.00918.79
8.3.30.0110.00819.07
8.3.20.0040.00420.30
8.3.10.0030.00521.83
8.3.00.0040.00422.45
8.2.180.0070.00716.50
8.2.170.0140.00722.96
8.2.160.0100.00320.35
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00319.55
8.2.110.0090.00021.94
8.2.100.0080.00419.46
8.2.90.0060.00319.17
8.2.80.0000.00819.21
8.2.70.0030.00617.63
8.2.60.0090.00217.93
8.2.50.0030.00518.07
8.2.40.0040.00418.09
8.2.30.0050.00318.23
8.2.20.0080.00017.81
8.2.10.0040.00417.92
8.2.00.0000.00717.82
8.1.280.0070.01425.92
8.1.270.0040.01420.52
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.80
8.1.230.0040.00719.04
8.1.220.0030.00517.74
8.1.210.0050.00518.77
8.1.200.0060.00317.48
8.1.190.0030.00617.52
8.1.180.0000.00820.25
8.1.170.0030.00518.59
8.1.160.0040.00422.21
8.1.150.0040.00418.55
8.1.140.0070.00017.42
8.1.130.0070.00017.89
8.1.120.0020.00517.42
8.1.110.0030.00617.45
8.1.100.0030.00617.55
8.1.90.0000.00817.39
8.1.80.0000.00717.48
8.1.70.0030.00317.46
8.1.60.0030.00517.65
8.1.50.0000.00717.47
8.1.40.0080.00017.46
8.1.30.0040.00417.53
8.1.20.0050.00317.66
8.1.10.0000.00717.60
8.1.00.0030.00517.42
8.0.300.0080.00018.77
8.0.290.0070.00017.16
8.0.280.0000.00718.47
8.0.270.0050.00317.21
8.0.260.0030.00316.92
8.0.250.0040.00416.95
8.0.240.0040.00417.05
8.0.230.0040.00416.93
8.0.220.0070.00016.98
8.0.210.0070.00016.94
8.0.200.0030.00316.99
8.0.190.0040.00416.95
8.0.180.0000.00717.00
8.0.170.0060.00316.95
8.0.160.0000.00716.99
8.0.150.0050.00317.03
8.0.140.0060.00316.86
8.0.130.0030.00313.44
8.0.120.0040.00417.04
8.0.110.0000.00716.96
8.0.100.0040.00417.00
8.0.90.0000.00716.93
8.0.80.0150.00016.93
8.0.70.0000.00716.90
8.0.60.0040.00417.03
8.0.50.0040.00416.98
8.0.30.0120.01317.12
8.0.20.0110.00817.40
8.0.10.0000.00716.98
8.0.00.0140.00516.79
7.4.330.0050.00015.00
7.4.320.0050.00316.61
7.4.300.0030.00316.55
7.4.290.0030.00316.65
7.4.280.0040.00416.60
7.4.270.0060.00016.56
7.4.260.0030.00316.53
7.4.250.0050.00316.50
7.4.240.0030.00316.52
7.4.230.0050.00216.46
7.4.220.0030.01516.66
7.4.210.0090.00716.63
7.4.200.0040.00416.59
7.4.190.0000.00716.61
7.4.160.0110.00616.64
7.4.150.0090.00917.40
7.4.140.0130.00617.86
7.4.130.0090.01116.62
7.4.120.0120.00616.54
7.4.110.0070.01116.60
7.4.100.0110.00716.59
7.4.90.0160.00316.61
7.4.80.0120.00819.39
7.4.70.0070.01116.46
7.4.60.0100.01316.52
7.4.50.0060.00016.45
7.4.40.0030.00922.77
7.4.30.0090.01216.55
7.4.00.0070.00715.09
7.3.330.0030.00313.38
7.3.320.0050.00013.46
7.3.310.0050.00216.31
7.3.300.0030.00316.42
7.3.290.0150.00616.44
7.3.280.0090.00816.48
7.3.270.0100.00717.40
7.3.260.0150.00916.47
7.3.250.0080.01016.50
7.3.240.0060.01216.47
7.3.230.0160.00816.66
7.3.210.0070.01016.57
7.3.200.0130.01019.39
7.3.190.0160.00616.47
7.3.180.0140.00416.57
7.3.170.0150.00716.54
7.3.160.0120.00416.60
7.3.120.0030.01315.04
7.2.330.0140.00416.54
7.2.320.0090.00916.80
7.2.310.0060.01216.84
7.2.300.0080.00816.93
7.2.290.0090.00916.89
7.2.110.0170.01416.48
7.2.80.0030.01316.89
7.2.60.0090.00316.93
7.2.00.0000.01319.34
7.1.200.0060.00615.63
7.1.100.0000.01617.96
7.1.70.0100.01017.09
7.1.60.0060.01919.50
7.1.50.0000.01616.99
7.1.00.0000.07722.57
7.0.200.0040.00716.91
7.0.140.0030.07722.04
7.0.60.0030.08719.99
7.0.50.0130.07017.95
7.0.40.0100.08320.09
7.0.30.0230.04020.16
7.0.20.0330.07020.06
7.0.10.0370.05720.25
7.0.00.0030.06320.10
5.6.280.0000.07321.14
5.6.210.0170.07020.57
5.6.200.0030.08318.22
5.6.190.0130.08020.47
5.6.180.3830.03320.61
5.6.170.0370.06720.51
5.6.160.0070.08320.55
5.6.150.0130.07318.22
5.6.140.0000.04318.25
5.6.130.0070.08718.20
5.6.120.0100.07321.02
5.6.110.0000.04320.98
5.6.100.0100.08321.00
5.6.90.0100.08321.10
5.6.80.0070.06320.40
5.6.70.0130.07320.55
5.5.350.0270.05720.32
5.5.340.0030.07017.96
5.5.330.0070.08320.40
5.5.320.0270.03720.35
5.5.310.0130.04320.19
5.5.300.0000.05718.02
5.5.290.0100.07318.07
5.5.280.0030.04020.89
5.5.270.0000.09020.70
5.5.260.0070.07720.78
5.5.250.0030.04020.71
5.5.240.0200.07320.26
5.4.450.0970.05719.71
5.4.440.0170.05319.46
5.4.430.0800.05719.62
5.4.420.1030.05719.47
5.4.410.0870.05719.42
5.4.400.0130.05718.67
5.4.390.1200.05718.57
5.4.380.0300.05318.61
5.4.370.0170.06318.74
5.4.360.0170.05318.70
5.4.350.0100.03712.04
5.4.340.0210.03712.03
5.4.320.0100.03512.52
5.4.310.0070.03812.52
5.4.300.0050.03712.52
5.4.290.0020.04112.52
5.4.280.0060.04912.42
5.4.270.0090.04412.41
5.4.260.0070.03912.41
5.4.250.0070.05019.02
5.4.240.0100.04718.99
5.4.230.0170.04718.77
5.4.220.0070.05318.66
5.4.210.0030.05718.96
5.4.200.0070.05319.10
5.4.190.0070.05018.76
5.4.180.0100.04718.93
5.4.170.0030.05718.89
5.4.160.0070.05718.73
5.4.150.0100.05018.92
5.4.140.0100.04716.48
5.4.130.0200.04716.41
5.4.120.0000.05316.44
5.4.110.0030.05316.46
5.4.100.0130.04016.62
5.4.90.0130.04316.52
5.4.80.0070.05716.66
5.4.70.0070.04716.43
5.4.60.0000.05316.48
5.4.50.0070.04716.53
5.4.40.0070.04716.67
5.4.30.0030.05016.52
5.4.20.0070.05016.45
5.4.10.0170.06316.46
5.4.00.0030.05016.05
5.3.290.0050.04612.80
5.3.280.0070.05014.78
5.3.270.0100.04714.46
5.3.260.0100.04714.75
5.3.250.0070.05014.45
5.3.240.0170.04014.65
5.3.230.0070.05014.74
5.3.220.0030.05314.71
5.3.210.0100.04714.76
5.3.200.0100.05314.71
5.3.190.0030.06014.66
5.3.180.0000.05314.80
5.3.170.0070.04714.71
5.3.160.0100.05314.43
5.3.150.0030.05014.59
5.3.140.0070.04714.54
5.3.130.0130.05014.63
5.3.120.0100.04714.64
5.3.110.0070.05014.39
5.3.100.0100.04314.14
5.3.90.0130.04314.04
5.3.80.0000.05314.02
5.3.70.0000.07314.05
5.3.60.0000.05313.99
5.3.50.0100.04714.06
5.3.40.0000.07014.14
5.3.30.0070.04713.99
5.3.20.0070.05013.73
5.3.10.0030.05313.82
5.3.00.0000.05313.48
5.2.170.0030.04311.17
5.2.160.0070.05011.39
5.2.150.0030.04711.15
5.2.140.0030.05711.12
5.2.130.0100.03711.20
5.2.120.0070.03711.30
5.2.110.0000.04311.11
5.2.100.0100.03311.02
5.2.90.0130.03310.95
5.2.80.0030.04711.10
5.2.70.0030.05011.20
5.2.60.0070.04011.15
5.2.50.0070.04311.26
5.2.40.0030.05711.11
5.2.30.0100.05310.98
5.2.20.0030.04010.98
5.2.10.0030.04710.99
5.2.00.0000.04310.75
5.1.60.0030.0339.96
5.1.50.0030.04010.24
5.1.40.0000.05010.06
5.1.30.0000.04010.27
5.1.20.0100.03310.47
5.1.10.0030.03310.26
5.1.00.0030.03710.15
5.0.50.0030.0308.66
5.0.40.0030.0278.49
5.0.30.0070.0378.24
5.0.20.0030.0308.39
5.0.10.0030.0278.30
5.0.00.0000.0438.12
4.4.90.0000.0275.92
4.4.80.0030.0235.92
4.4.70.0000.0235.88
4.4.60.0000.0235.89
4.4.50.0000.0235.96
4.4.40.0100.0275.97
4.4.30.0030.0205.88
4.4.20.0000.0235.97
4.4.10.0030.0236.03
4.4.00.0070.0375.90
4.3.110.0070.0205.89
4.3.100.0070.0175.82
4.3.90.0070.0175.86
4.3.80.0000.0335.80
4.3.70.0030.0235.80
4.3.60.0070.0175.81
4.3.50.0000.0235.80
4.3.40.0030.0335.76
4.3.30.0030.0235.66
4.3.20.0070.0175.66
4.3.10.0030.0205.66
4.3.00.0100.0236.91

preferences:
51.88 ms | 400 KiB | 5 Q