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.0070.00718.43
8.3.50.0100.00721.08
8.3.40.0090.00618.65
8.3.30.0060.00919.04
8.3.20.0070.00720.25
8.3.10.0060.00322.08
8.3.00.0050.00322.23
8.2.180.0040.01516.50
8.2.170.0100.01022.96
8.2.160.0070.01320.53
8.2.150.0050.00324.18
8.2.140.0070.01124.66
8.2.130.0040.01226.16
8.2.120.0060.00319.43
8.2.110.0030.00622.09
8.2.100.0040.00919.27
8.2.90.0000.00819.14
8.2.80.0040.00419.30
8.2.70.0000.00817.63
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0000.00818.22
8.2.30.0050.00318.14
8.2.20.0040.00417.82
8.2.10.0030.00517.73
8.2.00.0040.00417.75
8.1.280.0110.00725.92
8.1.270.0040.01220.48
8.1.260.0030.00526.35
8.1.250.0000.00928.09
8.1.240.0000.00923.79
8.1.230.0060.00619.08
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0000.01017.35
8.1.190.0040.00417.64
8.1.180.0040.00420.25
8.1.170.0030.00618.59
8.1.160.0000.00722.07
8.1.150.0040.00418.67
8.1.140.0000.00717.39
8.1.130.0000.00717.85
8.1.120.0000.00717.50
8.1.110.0040.00417.46
8.1.100.0040.00417.50
8.1.90.0000.00717.45
8.1.80.0040.00417.47
8.1.70.0000.00717.47
8.1.60.0030.00617.54
8.1.50.0040.00417.62
8.1.40.0000.00817.52
8.1.30.0050.00317.55
8.1.20.0030.00517.72
8.1.10.0000.00817.64
8.1.00.0050.00317.42
8.0.300.0070.00018.77
8.0.290.0080.00017.16
8.0.280.0000.00718.40
8.0.270.0000.00717.28
8.0.260.0000.00716.91
8.0.250.0030.00316.93
8.0.240.0000.00717.06
8.0.230.0000.00717.05
8.0.220.0030.00316.90
8.0.210.0000.00717.05
8.0.200.0030.00316.96
8.0.190.0000.00717.06
8.0.180.0040.00417.06
8.0.170.0000.00817.02
8.0.160.0070.00016.99
8.0.150.0070.00016.95
8.0.140.0060.00516.83
8.0.130.0030.00313.35
8.0.120.0050.00316.95
8.0.110.0040.00416.90
8.0.100.0070.00016.94
8.0.90.0040.00417.03
8.0.80.0130.00316.97
8.0.70.0070.00016.93
8.0.60.0040.00416.84
8.0.50.0050.00216.93
8.0.30.0090.01117.32
8.0.20.0130.00817.40
8.0.10.0000.00717.18
8.0.00.0050.01216.93
7.4.330.0030.00315.00
7.4.320.0000.00716.43
7.4.300.0030.00316.55
7.4.290.0000.00716.46
7.4.280.0030.00316.63
7.4.270.0050.00216.50
7.4.260.0070.00016.57
7.4.250.0040.00416.43
7.4.240.0040.00416.68
7.4.230.0030.00316.39
7.4.220.0140.01016.48
7.4.210.0080.00616.63
7.4.200.0000.00816.63
7.4.190.0040.00416.42
7.4.160.0140.00416.63
7.4.150.0210.00017.40
7.4.140.0100.00917.86
7.4.130.0080.00916.71
7.4.120.0110.00916.68
7.4.110.0100.01016.70
7.4.100.0090.01716.57
7.4.90.0100.01016.44
7.4.80.0090.00919.39
7.4.70.0140.01016.52
7.4.60.0170.00016.56
7.4.50.0030.00316.75
7.4.40.0100.00722.77
7.4.30.0040.01516.58
7.4.00.0090.00914.95
7.3.330.0000.00513.43
7.3.320.0030.00313.32
7.3.310.0080.00016.51
7.3.300.0000.00816.46
7.3.290.0050.01416.53
7.3.280.0130.00516.48
7.3.270.0210.00317.40
7.3.260.0000.01816.50
7.3.250.0140.00316.56
7.3.240.0070.01016.38
7.3.230.0100.01416.44
7.3.210.0030.01316.32
7.3.200.0120.00619.39
7.3.190.0120.00616.66
7.3.180.0030.01616.63
7.3.170.0090.01516.68
7.3.160.0030.01316.51
7.3.120.0100.00914.94
7.3.110.0060.01014.90
7.3.100.0050.01014.64
7.3.90.0020.01414.78
7.3.80.0030.01014.65
7.3.70.0070.00914.97
7.3.60.0110.00414.88
7.3.50.0050.00814.82
7.3.40.0030.00814.88
7.3.30.0080.00714.86
7.3.20.0070.00516.72
7.3.10.0070.00516.67
7.3.00.0050.00716.77
7.2.330.0090.00916.91
7.2.320.0090.01016.86
7.2.310.0100.01316.66
7.2.300.0080.00816.84
7.2.290.0130.00616.54
7.2.250.0050.01415.10
7.2.240.0030.01615.08
7.2.230.0120.00515.37
7.2.220.0040.01115.24
7.2.210.0060.01015.36
7.2.200.0060.00714.92
7.2.190.0070.00915.04
7.2.180.0050.00815.08
7.2.170.0020.01215.25
7.2.80.0040.00716.78
7.2.60.0030.00917.06
7.2.00.0000.01419.54
7.1.330.0080.00715.86
7.1.320.0030.01015.81
7.1.310.0070.00715.85
7.1.300.0050.00715.99
7.1.290.0050.01015.89
7.1.280.0060.00815.74
7.1.270.0030.00815.57
7.1.260.0030.01115.63
7.1.200.0130.00015.92
7.1.100.0000.01117.80
7.1.70.0000.00717.05
7.1.60.0100.01419.50
7.1.50.0030.01716.97
7.1.00.0030.03322.40
7.0.200.0040.00416.89
7.0.140.0030.07722.13
7.0.60.0000.08019.89
7.0.50.0070.08717.91
7.0.40.0100.08320.25
7.0.30.0230.08020.33
7.0.20.0200.04320.24
7.0.10.0300.07020.33
7.0.00.0130.07720.07
5.6.280.0100.06720.84
5.6.210.0000.04320.77
5.6.200.0100.08018.28
5.6.190.0130.08020.55
5.6.180.4170.04320.50
5.6.170.0270.07720.55
5.6.160.0130.05020.54
5.6.150.0070.08018.20
5.6.140.0100.03318.22
5.6.130.0100.05018.21
5.6.120.0030.08721.14
5.6.110.0100.03320.98
5.6.100.0130.07720.98
5.6.90.0100.07020.97
5.6.80.0100.07720.30
5.6.70.0170.08020.51
5.5.350.0230.08320.37
5.5.340.0100.06717.99
5.5.330.0070.08720.26
5.5.320.0300.07720.31
5.5.310.0300.07020.34
5.5.300.0100.07318.04
5.5.290.0170.07318.01
5.5.280.0030.04020.76
5.5.270.0030.05720.89
5.5.260.0030.09020.73
5.5.250.0070.03720.63
5.5.240.0100.07720.29
5.4.450.0270.03019.20
5.4.440.0300.03719.42
5.4.430.0230.03319.41
5.4.420.0670.06019.16
5.4.410.0230.06719.27
5.4.400.0270.06718.84
5.4.390.0200.04719.22
5.4.380.0230.03719.20
5.4.370.0200.03319.17
5.4.360.0170.04019.17
5.4.350.0170.03719.22
5.4.340.0200.04019.00
5.4.320.0170.05719.25
5.4.310.0330.06019.31
5.4.300.0200.04718.94
5.4.290.0230.07318.84
5.4.280.0200.04319.13
5.4.270.0200.03318.95
5.4.260.0230.06719.21
5.4.250.0200.05019.23
5.4.240.0170.03719.08
5.4.230.0130.04019.19
5.4.220.0170.03718.87
5.4.210.0230.03019.16
5.4.200.0100.04719.21
5.4.190.0130.04319.16
5.4.180.0130.04019.21
5.4.170.0330.04019.01
5.4.160.0170.03719.07
5.4.150.0370.03719.31
5.4.140.0170.03716.35
5.4.130.0170.04316.38
5.4.120.0330.03016.54
5.4.110.0130.04016.45
5.4.100.0200.03316.63
5.4.90.0170.03716.57
5.4.80.0200.03316.53
5.4.70.0130.03716.49
5.4.60.0200.03016.52
5.4.50.0370.03316.50
5.4.40.0200.03316.54
5.4.30.0070.04716.27
5.4.20.0170.03316.54
5.4.10.0370.03316.57
5.4.00.0170.03715.95
5.3.290.0200.05014.59
5.3.280.0230.04314.61
5.3.270.0200.03714.52
5.3.260.0270.05714.87
5.3.250.0130.04014.54
5.3.240.0200.03314.63
5.3.230.0200.03314.70
5.3.220.0200.03314.49
5.3.210.0130.04014.68
5.3.200.0230.03314.61
5.3.190.0170.03714.62
5.3.180.0170.03714.71
5.3.170.0130.04014.59
5.3.160.0170.04014.73
5.3.150.0230.03014.66
5.3.140.0300.04014.57
5.3.130.0430.03014.71
5.3.120.0130.04014.68
5.3.110.0170.04014.62
5.3.100.0170.04314.30
5.3.90.0200.03714.11
5.3.80.0130.04014.04
5.3.70.0130.04713.95
5.3.60.0200.03714.03
5.3.50.0230.03014.08
5.3.40.0230.03313.87
5.3.30.0230.02714.01
5.3.20.0200.03713.83
5.3.10.0170.03313.58
5.3.00.0170.04713.88
5.2.170.0130.03011.25
5.2.160.0100.03011.25
5.2.150.0130.03011.08
5.2.140.0130.03011.12
5.2.130.0200.02311.27
5.2.120.0100.03011.27
5.2.110.0130.03011.03
5.2.100.0130.02711.07
5.2.90.0130.02711.22
5.2.80.0100.04311.34
5.2.70.0100.03311.12
5.2.60.0170.02711.13
5.2.50.0170.03711.19
5.2.40.0170.03311.13
5.2.30.0100.03011.07
5.2.20.0130.02711.07
5.2.10.0200.02010.84
5.2.00.0100.03010.83
5.1.60.0100.0239.93
5.1.50.0070.02710.13
5.1.40.0030.03010.24
5.1.30.0130.02310.38
5.1.20.0130.03010.30
5.1.10.0100.03710.20
5.1.00.0170.03010.01
5.0.50.0070.0478.60
5.0.40.0030.0408.55
5.0.30.0100.0408.15
5.0.20.0070.0308.43
5.0.10.0070.0478.12
5.0.00.0030.0378.14
4.4.90.0100.0137.74
4.4.80.0130.0337.74
4.4.70.0170.0307.74
4.4.60.0100.0137.74
4.4.50.0130.0277.74
4.4.40.0070.0507.74
4.4.30.0100.0337.74
4.4.20.0070.0177.74
4.4.10.0070.0177.74
4.4.00.0100.0507.74
4.3.110.0070.0277.74
4.3.100.0100.0307.74
4.3.90.0070.0377.74
4.3.80.0100.0577.74
4.3.70.0100.0237.74
4.3.60.0070.0377.74
4.3.50.0230.0207.74
4.3.40.0070.0337.74
4.3.30.0000.0237.74
4.3.20.0100.0307.74
4.3.10.0030.0377.74
4.3.00.0070.0307.74

preferences:
44.63 ms | 401 KiB | 5 Q