3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace OAuth2\Storage { /** * Implement this interface to specify where the OAuth2 Server * should get/save authorization codes for the "Authorization Code" * grant type * * @author Brent Shaffer <bshafs at gmail dot com> */ interface AuthorizationCodeInterface { /** * The Authorization Code grant type supports a response type of "code". * * @var string * @see http://tools.ietf.org/html/rfc6749#section-1.4.1 * @see http://tools.ietf.org/html/rfc6749#section-4.2 */ const RESPONSE_TYPE_CODE = "code"; /** * Fetch authorization code data (probably the most common grant type). * * Retrieve the stored data for the given authorization code. * * Required for OAuth2::GRANT_TYPE_AUTH_CODE. * * @param $code * Authorization code to be check with. * * @return * An associative array as below, and NULL if the code is invalid * @code * return array( * "client_id" => CLIENT_ID, // REQUIRED Stored client identifier * "user_id" => USER_ID, // REQUIRED Stored user identifier * "expires" => EXPIRES, // REQUIRED Stored expiration in unix timestamp * "redirect_uri" => REDIRECT_URI, // REQUIRED Stored redirect URI * "scope" => SCOPE, // OPTIONAL Stored scope values in space-separated string * ); * @endcode * * @see http://tools.ietf.org/html/rfc6749#section-4.1 * * @ingroup oauth2_section_4 */ public function getAuthorizationCode($code); /** * Take the provided authorization code values and store them somewhere. * * This function should be the storage counterpart to getAuthCode(). * * If storage fails for some reason, we're not currently checking for * any sort of success/failure, so you should bail out of the script * and provide a descriptive fail message. * * Required for OAuth2::GRANT_TYPE_AUTH_CODE. * * @param string $code Authorization code to be stored. * @param mixed $client_id Client identifier to be stored. * @param mixed $user_id User identifier to be stored. * @param string $redirect_uri Redirect URI(s) to be stored in a space-separated string. * @param int $expires Expiration to be stored as a Unix timestamp. * @param string $scope OPTIONAL Scopes to be stored in space-separated string. * * @ingroup oauth2_section_4 */ public function setAuthorizationCode($code, $client_id, $user_id, $redirect_uri, $expires, $scope = null); /** * once an Authorization Code is used, it must be exipired * * @see http://tools.ietf.org/html/rfc6749#section-4.1.2 * * The client MUST NOT use the authorization code * more than once. If an authorization code is used more than * once, the authorization server MUST deny the request and SHOULD * revoke (when possible) all tokens previously issued based on * that authorization code * */ public function expireAuthorizationCode($code); } } namespace OAuth2\OpenID\Storage { use OAuth2\Storage\AuthorizationCodeInterface as BaseAuthorizationCodeInterface; /** * Implement this interface to specify where the OAuth2 Server * should get/save authorization codes for the "Authorization Code" * grant type * * @author Brent Shaffer <bshafs at gmail dot com> */ interface AuthorizationCodeInterface extends BaseAuthorizationCodeInterface { /** * Take the provided authorization code values and store them somewhere. * * This function should be the storage counterpart to getAuthCode(). * * If storage fails for some reason, we're not currently checking for * any sort of success/failure, so you should bail out of the script * and provide a descriptive fail message. * * Required for OAuth2::GRANT_TYPE_AUTH_CODE. * * @param $code authorization code to be stored. * @param $client_id client identifier to be stored. * @param $user_id user identifier to be stored. * @param string $redirect_uri redirect URI(s) to be stored in a space-separated string. * @param int $expires expiration to be stored as a Unix timestamp. * @param string $scope OPTIONAL scopes to be stored in space-separated string. * @param string $id_token OPTIONAL the OpenID Connect id_token. * * @ingroup oauth2_section_4 public function setAuthorizationCode($code, $client_id, $user_id, $redirect_uri, $expires, $scope = null, $id_token = null); */ } }

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.40.0070.00718.46
8.3.30.0070.00718.93
8.3.20.0040.00420.39
8.3.10.0060.00320.28
8.3.00.0080.00019.13
8.2.170.0070.00722.96
8.2.160.0000.01420.38
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00322.11
8.2.110.0040.00719.45
8.2.100.0040.00717.72
8.2.90.0060.00317.90
8.2.80.0080.00017.97
8.2.70.0050.00317.50
8.2.60.0050.00317.93
8.2.50.0060.00318.07
8.2.40.0020.00518.09
8.2.30.0000.00718.00
8.2.20.0000.00717.54
8.2.10.0050.00218.14
8.2.00.0020.00517.57
8.1.270.0000.00923.79
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00622.58
8.1.230.0080.00320.95
8.1.220.0090.00017.74
8.1.210.0080.00518.77
8.1.200.0080.00017.10
8.1.190.0030.00517.22
8.1.180.0040.00418.10
8.1.170.0050.00318.51
8.1.160.0040.00421.94
8.1.150.0020.00518.74
8.1.140.0060.00317.36
8.1.130.0030.00317.81
8.1.120.0000.00717.39
8.1.110.0000.00817.34
8.1.100.0050.00317.45
8.1.90.0000.00717.44
8.1.80.0020.00517.34
8.1.70.0040.00417.36
8.1.60.0030.00717.48
8.1.50.0030.00517.46
8.1.40.0040.00417.46
8.1.30.0040.00417.68
8.1.20.0070.00017.66
8.1.10.0040.00417.39
8.1.00.0050.00317.30
8.0.300.0040.00419.86
8.0.290.0000.00716.63
8.0.280.0070.00018.39
8.0.270.0000.00716.81
8.0.260.0060.00017.08
8.0.250.0000.00716.88
8.0.240.0040.00416.90
8.0.230.0000.00716.81
8.0.220.0000.00716.88
8.0.210.0040.00416.68
8.0.200.0070.00016.90
8.0.190.0040.00416.80
8.0.180.0050.00216.88
8.0.170.0090.00016.91
8.0.160.0040.00416.71
8.0.150.0000.00716.67
8.0.140.0060.00616.83
8.0.130.0040.00413.36
8.0.120.0050.00316.69
8.0.110.0070.00016.84
8.0.100.0040.00416.80
8.0.90.0040.00416.66
8.0.80.0090.00616.78
8.0.70.0000.00716.67
8.0.60.0050.00316.75
8.0.50.0000.00816.82
8.0.30.0130.00516.89
8.0.20.0160.00317.40
8.0.10.0020.00517.02
8.0.00.0150.00616.60
7.4.330.0030.00315.09
7.4.320.0040.00416.52
7.4.300.0060.00016.46
7.4.290.0030.00316.54
7.4.280.0030.00516.46
7.4.270.0000.00716.54
7.4.260.0000.00716.53
7.4.250.0050.00316.43
7.4.240.0040.00416.45
7.4.230.0000.00716.37
7.4.220.0150.01116.47
7.4.210.0200.00016.65
7.4.200.0070.00016.60
7.4.160.0040.01216.19
7.4.150.0060.01117.40
7.4.140.0090.01217.86
7.4.130.0080.01016.45
7.4.120.0080.00916.49
7.4.110.0060.01616.59
7.4.100.0040.01216.39
7.4.90.0120.00616.54
7.4.80.0120.00919.39
7.4.70.0090.00916.16
7.4.60.0060.01216.29
7.4.50.0000.00516.53
7.4.40.0120.00416.50
7.4.30.0120.00616.56
7.4.00.0050.01114.75
7.3.330.0020.00213.05
7.3.320.0050.00013.14
7.3.310.0040.00416.23
7.3.300.0030.00316.20
7.3.290.0110.00816.20
7.3.280.0060.01116.17
7.3.270.0090.00917.40
7.3.260.0100.00716.29
7.3.250.0100.00616.49
7.3.240.0070.01016.30
7.3.230.0080.00816.39
7.3.210.0130.00316.46
7.3.200.0030.01519.39
7.3.190.0060.01016.26
7.3.180.0150.01916.18
7.3.170.0000.01616.27
7.3.160.0090.00616.20
7.3.120.0060.00814.78
7.3.110.0050.00814.60
7.3.100.0070.00614.80
7.3.90.0060.00814.63
7.3.80.0080.00314.59
7.3.70.0040.00914.66
7.3.60.0060.00914.63
7.3.50.0090.00514.60
7.3.40.0080.00814.67
7.3.30.0050.00514.74
7.3.20.0030.01216.63
7.3.10.0040.01016.56
7.3.00.0040.01016.44
7.2.330.0060.00916.66
7.2.320.0110.00916.25
7.2.310.0100.00716.61
7.2.300.0100.00716.59
7.2.290.0150.00616.57
7.2.250.0140.00314.82
7.2.240.0070.00614.86
7.2.230.0080.00314.79
7.2.220.0100.00514.88
7.2.210.0030.00914.94
7.2.200.0050.01014.91
7.2.190.0050.00714.75
7.2.180.0110.00514.82
7.2.170.0060.00614.88
7.2.160.0070.01014.78
7.2.150.0100.00716.60
7.2.140.0040.01116.87
7.2.130.0040.01316.44
7.2.120.0100.00816.70
7.2.110.0170.00316.67
7.2.100.0080.01016.70
7.2.90.0020.01216.42
7.2.80.0110.00716.80
7.2.70.0090.00516.65
7.2.60.0100.00616.52
7.2.50.0080.00816.51
7.2.40.0070.01016.54
7.2.30.0070.01016.76
7.2.20.0090.00516.62
7.2.10.0070.00316.56
7.2.00.0050.00817.52
7.1.330.0080.00615.59
7.1.320.0090.00315.88
7.1.310.0090.00515.63
7.1.300.0030.00915.68
7.1.290.0040.00915.61
7.1.280.0030.00915.61
7.1.270.0070.00615.78
7.1.260.0130.00315.70
7.1.250.0110.00415.40
7.1.200.0030.00915.77
7.1.100.0210.00918.04
7.1.70.0040.00917.11
7.1.60.0110.01419.32
7.1.50.0070.01716.79
7.1.00.0000.08022.42
7.0.200.0000.00816.71
7.0.140.0000.09321.96
7.0.70.2430.04319.99
7.0.60.0070.03719.91
7.0.50.0030.04017.89
7.0.40.0070.06020.04
7.0.30.0370.07020.09
7.0.20.0300.04020.20
7.0.10.0200.03720.07
7.0.00.0070.07320.07
5.6.280.0030.07321.01
5.6.210.0070.03720.69
5.6.200.0100.04718.25
5.6.190.0000.08020.54
5.6.180.0100.06020.66
5.6.170.0130.04320.48
5.6.160.0030.08720.54
5.6.150.0030.06018.29
5.6.140.0200.07018.18
5.6.130.0100.08018.27
5.6.120.0070.08020.99
5.6.110.0000.04321.12
5.6.100.0100.06721.01
5.6.90.0070.05321.10
5.6.80.0130.04720.51
5.6.70.0100.07720.40
5.5.350.0030.06720.50
5.5.340.0070.06317.98
5.5.330.0130.08020.47
5.5.320.0000.06320.44
5.5.310.0330.07020.33
5.5.300.0100.07717.95
5.5.290.0030.05318.06
5.5.280.0070.06320.80
5.5.270.0200.05320.85
5.5.260.0100.08020.69
5.5.250.0200.07720.59
5.5.240.0070.07020.16
5.4.450.1300.03719.41
5.4.440.0800.06019.34
5.4.430.0730.05719.59
5.4.420.0630.00019.52
5.4.410.0630.00019.52
5.4.400.0630.00019.22
5.4.390.0600.00019.21
5.4.380.0630.00019.12
5.4.370.0630.00019.24
5.4.360.0630.00019.09
5.4.350.0630.00018.98
5.4.340.0630.00019.02
5.4.320.0070.03512.50
5.4.310.0070.03912.50
5.4.300.0090.03312.51
5.4.290.0060.03712.50
5.4.280.0090.03212.40
5.4.270.0080.03412.40
5.4.260.0080.03512.39
5.4.250.0070.03612.40
5.4.240.0070.03512.40
5.4.230.0070.03612.39
5.4.220.0050.03712.39
5.4.210.0060.03512.39
5.4.200.0100.03412.39
5.4.190.0060.03612.39
5.4.180.0030.03912.39
5.4.170.0090.03312.40
5.4.160.0060.03612.39
5.4.150.0030.03912.39
5.4.140.0050.03812.07
5.4.130.0080.03612.06
5.4.120.0080.04812.02
5.4.110.0030.03812.02
5.4.100.0060.03512.02
5.4.90.0030.04012.02
5.4.80.0060.03712.02
5.4.70.0050.03612.02
5.4.60.0040.03612.02
5.4.50.0060.03512.01
5.4.40.0060.03412.00
5.4.30.0030.03912.00
5.4.20.0060.03512.00
5.4.10.0050.03612.00
5.4.00.0080.03311.49
5.3.290.0120.03212.80
5.3.280.0070.03712.71
5.3.270.0060.03912.72
5.3.260.0060.03912.72
5.3.250.0050.03812.72
5.3.240.0080.03512.72
5.3.230.0040.04512.71
5.3.220.0050.03712.68
5.3.210.0120.03212.68
5.3.200.0070.03512.68
5.3.190.0040.04012.68
5.3.180.0040.03812.68
5.3.170.0030.03912.67
5.3.160.0040.03812.67
5.3.150.0060.03612.68
5.3.140.0050.03712.66
5.3.130.0040.04212.66
5.3.120.0090.03512.66
5.3.110.0060.03812.66
5.3.100.0020.03912.13
5.3.90.0110.03112.11
5.3.80.0070.03512.10
5.3.70.0030.03812.10
5.3.60.0050.03712.09
5.3.50.0060.03512.03
5.3.40.0070.03612.03
5.3.30.0030.03711.98
5.3.20.0040.03711.77
5.3.10.0070.03311.73
5.3.00.0040.03611.73
5.2.170.0070.0289.18
5.2.160.0080.0269.18
5.2.150.0030.0329.19
5.2.140.0050.0339.18
5.2.130.0060.0269.14
5.2.120.0060.0259.14
5.2.110.0070.0269.15
5.2.100.0030.0299.14
5.2.90.0040.0289.14
5.2.80.0040.0309.14
5.2.70.0050.0299.14
5.2.60.0050.0299.09
5.2.50.0010.0339.07
5.2.40.0050.0289.04
5.2.30.0060.0279.02
5.2.20.0060.0279.00
5.2.10.0040.0288.93
5.2.00.0060.0278.79
5.1.60.0040.0248.07
5.1.50.0060.0228.06
5.1.40.0040.0248.05
5.1.30.0020.0288.40
5.1.20.0060.0248.42
5.1.10.0030.0278.14
5.1.00.0040.0268.14
5.0.50.0030.0216.63
5.0.40.0030.0196.48
5.0.30.0040.0306.30
5.0.20.0030.0196.27
5.0.10.0030.0206.25
5.0.00.0010.0326.24
4.4.90.0030.0144.78
4.4.80.0030.0154.75
4.4.70.0020.0164.75
4.4.60.0030.0154.76
4.4.50.0060.0124.77
4.4.40.0040.0234.71
4.4.30.0010.0174.76
4.4.20.0010.0174.84
4.4.10.0020.0164.85
4.4.00.0040.0234.76
4.3.110.0010.0174.67
4.3.100.0030.0154.67
4.3.90.0010.0164.64
4.3.80.0040.0224.59
4.3.70.0030.0134.63
4.3.60.0040.0134.63
4.3.50.0030.0154.63
4.3.40.0030.0234.54
4.3.30.0020.0163.29
4.3.20.0020.0153.26
4.3.10.0000.0173.22
4.3.00.0030.0134.76

preferences:
41.43 ms | 400 KiB | 5 Q