3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret="rfig34r8gw4i3ve49hfvowgrv9wu3robwer"; $signed_request = "LgW-AUQF8gdSfmrGTb3rGUJxzH-3Lck2K0hDMO_d-Fg.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTQ1MzExNjAwMiwicGFnZSI6eyJpZCI6IjM4MTM5OTczMDgyNyIsImFkbWluIjp0cnVlLCJsaWtlZCI6dHJ1ZX0sInVzZXIiOnsiY291bnRyeSI6ImdiIiwibG9jYWxlIjoiZW5fR0IiLCJhZ2UiOnsibWluIjoyMX19fQ"; list($encoded_sig, $payload) = explode('.', $signed_request, 2); // decode the data $sig = self::base64_url_decode($encoded_sig); $data = json_decode(self::base64_url_decode($payload), true); if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') { die('Unknown algorithm. Expected HMAC-SHA256'); } // check sig $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true); if ($sig !== $expected_sig) { die('Bad Signed JSON signature!'); } print_r($data);

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.0120.00316.75
8.3.50.0150.00317.77
8.3.40.0000.01418.84
8.3.30.0100.00318.64
8.3.20.0000.00820.34
8.3.10.0040.00420.41
8.3.00.0050.00223.66
8.2.180.0120.00318.16
8.2.170.0120.00322.96
8.2.160.0080.00622.12
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00420.95
8.2.120.0080.00026.35
8.2.110.0090.00019.24
8.2.100.0120.00017.91
8.2.90.0050.00319.09
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0070.00417.93
8.2.50.0000.00818.09
8.2.40.0060.00322.11
8.2.30.0000.00719.54
8.2.20.0050.00317.74
8.2.10.0040.00418.02
8.2.00.0070.00018.04
8.1.280.0040.01125.92
8.1.270.0080.00821.91
8.1.260.0000.00728.09
8.1.250.0000.00828.09
8.1.240.0030.00621.36
8.1.230.0070.00417.45
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0030.00517.35
8.1.180.0000.00818.10
8.1.170.0050.00518.59
8.1.160.0050.00520.74
8.1.150.0000.00818.81
8.1.140.0000.00819.57
8.1.130.0000.00717.52
8.1.120.0040.00417.30
8.1.110.0040.00417.36
8.1.100.0040.00317.44
8.1.90.0070.00017.39
8.1.80.0040.00317.36
8.1.70.0040.00417.30
8.1.60.0030.00617.55
8.1.50.0040.00417.49
8.1.40.0060.00317.38
8.1.30.0040.00417.62
8.1.20.0000.00817.44
8.1.10.0040.00417.51
8.1.00.0000.00817.54
8.0.300.0000.00718.77
8.0.290.0090.00016.75
8.0.280.0000.00718.38
8.0.270.0000.00717.18
8.0.260.0030.00317.13
8.0.250.0030.00316.95
8.0.240.0060.00017.00
8.0.230.0040.00416.95
8.0.220.0000.00716.91
8.0.210.0030.00316.76
8.0.200.0030.00316.95
8.0.190.0040.00416.96
8.0.180.0000.00716.92
8.0.170.0030.00516.92
8.0.160.0030.00616.92
8.0.150.0050.00216.85
8.0.140.0000.00916.71
8.0.130.0030.00313.31
8.0.120.0080.00016.89
8.0.110.0080.00016.79
8.0.100.0060.00316.92
8.0.90.0040.00416.86
8.0.80.0100.01016.84
8.0.70.0040.00416.88
8.0.60.0040.00416.68
8.0.50.0040.00416.80
8.0.30.0090.00617.14
8.0.20.0100.00817.40
8.0.10.0050.00316.90
8.0.00.0100.00916.99
7.4.330.0000.00516.79
7.4.320.0000.00716.45
7.4.300.0030.00616.51
7.4.290.0070.00016.62
7.4.280.0040.00416.62
7.4.270.0040.00416.59
7.4.260.0000.00816.54
7.4.250.0040.00416.54
7.4.240.0030.00516.47
7.4.230.0050.00216.42
7.4.220.0090.00916.57
7.4.210.0070.00716.59
7.4.200.0040.00416.58
7.4.160.0030.01316.40
7.4.150.0100.00717.40
7.4.140.0080.01317.86
7.4.130.0070.01216.44
7.4.120.0100.00716.68
7.4.110.0050.01116.63
7.4.100.0140.00416.68
7.4.90.0100.00716.48
7.4.80.0090.00919.39
7.4.70.0080.00816.43
7.4.60.0160.00616.59
7.4.50.0000.01516.34
7.4.40.0110.01116.44
7.4.30.0120.01216.73
7.4.00.0110.00514.87
7.3.330.0050.00013.26
7.3.320.0060.00013.05
7.3.310.0000.00916.26
7.3.300.0020.00516.32
7.3.290.0040.00416.22
7.3.280.0050.01116.39
7.3.270.0100.00717.40
7.3.260.0140.01116.32
7.3.250.0100.01016.33
7.3.240.0110.00916.43
7.3.230.0060.01216.39
7.3.210.0070.01016.30
7.3.200.0100.00719.39
7.3.190.0030.01416.49
7.3.180.0040.01216.11
7.3.170.0040.01216.25
7.3.160.0030.01316.22
7.3.120.0090.00914.93
7.3.110.0030.01414.82
7.3.100.0040.01414.81
7.3.90.0060.01014.83
7.3.80.0070.01114.41
7.3.70.0070.00714.86
7.3.60.0000.01114.52
7.3.50.0060.00614.53
7.3.40.0060.00614.41
7.3.30.0000.01314.87
7.3.20.0060.00916.74
7.3.10.0060.00616.48
7.3.00.0050.00816.49
7.2.330.0140.00416.31
7.2.320.0120.00916.64
7.2.310.0200.00616.66
7.2.300.0080.00916.36
7.2.290.0110.00616.38
7.2.250.0100.00314.86
7.2.240.0100.00314.90
7.2.230.0080.00514.96
7.2.220.0030.01014.89
7.2.210.0130.00314.98
7.2.200.0070.00415.09
7.2.190.0090.00615.15
7.2.180.0080.00414.85
7.2.170.0080.00314.97
7.2.160.0050.00515.04
7.2.150.0040.00716.67
7.2.140.0100.00316.84
7.2.130.0060.01016.83
7.2.120.0090.00416.76
7.2.110.0120.00216.80
7.2.100.0030.00816.60
7.2.90.0060.01116.54
7.2.80.0100.00816.92
7.2.70.0050.00716.80
7.2.60.0070.00816.75
7.2.50.0100.00816.96
7.2.40.0050.01016.95
7.2.30.0060.00516.95
7.2.20.0050.01016.93
7.2.10.0070.00716.66
7.2.00.0090.00317.65
7.1.330.0040.01215.73
7.1.320.0070.01115.72
7.1.310.0090.00615.69
7.1.300.0100.00015.86
7.1.290.0030.00615.59
7.1.280.0030.00915.72
7.1.270.0030.01015.82
7.1.260.0070.00715.82
7.1.250.0050.00815.61
7.1.240.0080.00415.93
7.1.230.0110.00415.69
7.1.220.0030.00915.80
7.1.210.0030.00715.52
7.1.200.0080.00715.69
7.1.190.0060.00615.75
7.1.180.0060.00915.51
7.1.170.0100.00615.74
7.1.160.0060.01415.56
7.1.150.0100.00315.84
7.1.140.0030.01215.88
7.1.130.0090.00315.54
7.1.120.0030.00615.55
7.1.110.0060.00615.74
7.1.100.0060.00616.86
7.1.90.0130.00315.79
7.1.80.0000.01015.77
7.1.70.0040.00716.37
7.1.60.0070.00917.41
7.1.50.0080.00816.18
7.1.40.0060.00615.76
7.1.30.0030.00615.81
7.1.20.0080.00315.84
7.1.10.0000.01415.71
7.1.00.0040.04019.16
7.0.330.0050.00515.30
7.0.320.0140.00315.27
7.0.310.0090.00615.52
7.0.300.0000.01215.38
7.0.290.0070.00715.38
7.0.280.0120.00315.24
7.0.270.0080.00415.45
7.0.260.0040.00415.51
7.0.250.0030.01015.47
7.0.240.0120.00415.36
7.0.230.0080.00815.24
7.0.220.0100.00315.17
7.0.210.0080.00815.21
7.0.200.0270.00514.85
7.0.190.0070.00715.46
7.0.180.0040.01115.17
7.0.170.0090.00615.22
7.0.160.0000.00815.18
7.0.150.0090.00315.32
7.0.140.0100.00315.37
7.0.130.0080.00415.45
7.0.120.0030.01015.43
7.0.110.0040.00415.42
7.0.100.0110.00315.56
7.0.90.0110.00415.34
7.0.80.0070.00715.24
7.0.70.0070.00715.64
7.0.60.0070.04418.58
7.0.50.0070.02716.49
7.0.40.0030.02516.92
7.0.30.0070.03116.74
7.0.20.0180.04016.65
7.0.10.0050.04816.89
7.0.00.0100.02716.86
5.6.400.0000.01414.62
5.6.390.0000.01214.37
5.6.380.0070.00714.50
5.6.370.0030.01314.54
5.6.360.0100.00714.39
5.6.350.0070.01014.39
5.6.340.0060.00613.98
5.6.330.0030.01213.90
5.6.320.0100.00314.29
5.6.310.0070.00714.38
5.6.300.0090.00314.24
5.6.290.0080.00014.47
5.6.280.0040.03117.66
5.6.270.0060.00614.54
5.6.260.0060.00914.25
5.6.250.0000.01414.14
5.6.240.0100.00314.60
5.6.230.0000.01414.38
5.6.220.0040.01114.53
5.6.210.0100.03917.44
5.6.200.0070.02916.16
5.6.190.0090.03017.46
5.6.180.0200.04017.33
5.6.170.0130.04517.21
5.6.160.0080.04117.33
5.6.150.0070.04216.15
5.6.140.0070.02716.07
5.6.130.0090.02416.13
5.6.120.0030.02717.67
5.6.110.0100.03917.69
5.6.100.0050.03817.64
5.6.90.0050.02917.65
5.6.80.0080.04117.32
5.6.70.0070.00714.11
5.6.60.0040.00814.31
5.6.50.0040.00714.04
5.6.40.0090.00314.32
5.6.30.0070.00714.23
5.6.20.0070.00414.48
5.6.10.0000.01114.31
5.6.00.0000.00914.16
5.5.380.0000.01414.22
5.5.370.0100.00614.15
5.5.360.0100.00314.12
5.5.350.2100.02217.26
5.5.340.0100.03816.02
5.5.330.0010.03417.29
5.5.320.0280.02317.07
5.5.310.0210.03817.21
5.5.300.0050.02716.11
5.5.290.0090.04016.12
5.5.280.0150.02317.34
5.5.270.0080.04517.45
5.5.260.0050.02517.53
5.5.250.0030.02517.43
5.5.240.0170.04217.11
5.5.230.0070.00714.17
5.5.220.0070.01014.23
5.5.210.0030.00613.92
5.5.200.0070.00314.34
5.5.190.0060.00314.38
5.5.180.0060.00613.86
5.5.170.0000.01514.13
5.5.160.0070.00414.02
5.5.150.0070.00314.07
5.5.140.0060.00614.19
5.5.130.0060.00314.08
5.5.120.0080.00414.30
5.5.110.0030.01313.92
5.5.100.0040.01114.24
5.5.90.0000.01814.13
5.5.80.0030.01014.29
5.5.70.0070.00713.96
5.5.60.0060.00614.23
5.5.50.0030.00613.80
5.5.40.0060.00313.89
5.5.30.0030.00614.05
5.5.20.0070.00714.14
5.5.10.0060.01014.28
5.5.00.0090.00013.97

preferences:
51.63 ms | 400 KiB | 5 Q