3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret="rfig34r8gw4i3ve49hfvowgrv9wu3robwer"; $signed = "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.0040.01116.75
8.3.50.0090.00822.05
8.3.40.0040.01118.80
8.3.30.0110.00318.84
8.3.20.0070.00020.12
8.3.10.0030.00520.71
8.3.00.0080.00023.66
8.2.180.0070.00716.88
8.2.170.0140.00422.96
8.2.160.0120.00322.12
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00020.82
8.2.120.0040.00426.35
8.2.110.0040.00721.13
8.2.100.0090.00317.72
8.2.90.0050.00317.84
8.2.80.0050.00219.25
8.2.70.0050.00317.63
8.2.60.0040.00417.50
8.2.50.0060.00617.63
8.2.40.0030.00617.63
8.2.30.0080.00017.63
8.2.20.0030.00617.68
8.2.10.0000.00717.93
8.2.00.0040.00418.13
8.1.280.0120.00625.92
8.1.270.0060.01322.06
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0090.00320.76
8.1.230.0130.00620.68
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0000.00917.36
8.1.190.0000.00917.23
8.1.180.0040.00418.10
8.1.170.0000.00717.62
8.1.160.0040.00418.70
8.1.150.0040.00418.83
8.1.140.0080.00019.39
8.1.130.0070.00017.68
8.1.120.0050.00217.45
8.1.110.0000.00717.29
8.1.100.0000.00717.39
8.1.90.0000.00717.28
8.1.80.0030.00317.40
8.1.70.0030.00317.32
8.1.60.0000.00817.48
8.1.50.0030.00517.55
8.1.40.0070.00317.48
8.1.30.0040.00417.57
8.1.20.0040.00417.60
8.1.10.0040.00417.59
8.1.00.0040.00417.50
8.0.300.0030.00619.98
8.0.290.0040.00416.75
8.0.280.0000.00817.88
8.0.270.0000.00718.00
8.0.260.0000.00617.21
8.0.250.0030.00316.95
8.0.240.0060.00016.87
8.0.230.0070.00016.93
8.0.220.0000.00716.94
8.0.210.0000.00816.86
8.0.200.0000.00616.87
8.0.190.0060.00316.86
8.0.180.0040.00416.81
8.0.170.0040.00416.81
8.0.160.0040.00416.93
8.0.150.0050.00216.73
8.0.140.0110.00016.85
8.0.130.0050.00013.26
8.0.120.0040.00416.86
8.0.110.0050.00216.79
8.0.100.0040.00416.96
8.0.90.0000.00716.96
8.0.80.0030.01316.82
8.0.70.0000.00816.75
8.0.60.0040.00416.71
8.0.50.0000.00816.82
8.0.30.0080.00917.08
8.0.20.0090.01117.40
8.0.10.0040.00417.06
8.0.00.0060.01116.83
7.4.330.0060.00016.67
7.4.320.0030.00316.45
7.4.300.0000.00716.64
7.4.290.0070.00016.63
7.4.280.0000.00716.59
7.4.270.0000.00716.55
7.4.260.0030.00316.51
7.4.250.0000.00716.50
7.4.240.0070.00016.47
7.4.230.0000.00716.50
7.4.220.0130.00916.43
7.4.210.0080.00616.55
7.4.200.0050.00216.59
7.4.160.0060.01016.40
7.4.150.0150.00717.40
7.4.140.0100.00817.86
7.4.130.0130.00916.56
7.4.120.0060.01216.66
7.4.110.0160.00016.32
7.4.100.0080.00916.36
7.4.90.0120.00616.45
7.4.80.0170.00019.39
7.4.70.0060.00916.53
7.4.60.0120.00916.42
7.4.50.0040.00816.33
7.4.40.0030.02016.64
7.4.30.0130.00616.57
7.4.00.0040.01214.86
7.3.330.0060.00013.16
7.3.320.0000.00613.25
7.3.310.0070.00016.25
7.3.300.0000.00716.18
7.3.290.0000.00716.21
7.3.280.0090.00916.34
7.3.270.0170.00717.40
7.3.260.0090.01216.48
7.3.250.0140.00716.56
7.3.240.0070.01216.40
7.3.230.0120.00616.47
7.3.210.0080.00816.25
7.3.200.0130.00619.39
7.3.190.0070.01016.43
7.3.180.0100.00716.16
7.3.170.0080.01216.49
7.3.160.0100.00616.20
7.3.10.0030.00916.61
7.3.00.0040.00916.48
7.2.330.0150.00916.68
7.2.320.0090.01216.55
7.2.310.0110.01416.56
7.2.300.0030.01416.55
7.2.290.0100.01316.63
7.2.130.0080.00716.76
7.2.120.0080.00716.90
7.2.110.0100.00616.58
7.2.100.0020.00916.80
7.2.90.0090.00516.85
7.2.80.0040.00816.86
7.2.70.0020.00916.95
7.2.60.0060.00816.82
7.2.50.0040.00916.71
7.2.40.0060.00816.94
7.2.30.0040.00916.87
7.2.20.0090.00616.87
7.2.10.0110.00216.93
7.2.00.0090.00617.35
7.1.250.0040.00615.49
7.1.200.0040.00815.73
7.1.100.0090.00318.13
7.1.70.0000.00717.28
7.1.60.0130.01019.40
7.1.50.0090.00917.05
7.1.00.0000.08022.36
7.0.200.0520.00014.46
7.0.60.0170.08721.71
7.0.50.0100.05717.66
7.0.40.0030.04320.09
7.0.30.0270.05720.20
7.0.20.0470.06320.18
7.0.10.0100.05320.18
7.0.00.0000.05720.12
5.6.280.0030.05720.89
5.6.210.0070.03720.66
5.6.200.0070.08018.18
5.6.190.0100.05020.39
5.6.180.0370.07320.56
5.6.170.0270.08020.38
5.6.160.0070.04720.49
5.6.150.0070.06018.18
5.6.140.0070.07318.13
5.6.130.0070.04318.16
5.6.120.0030.04320.98
5.6.110.0030.04320.94
5.6.100.0130.07721.07
5.6.90.0130.04721.07
5.6.80.0030.08720.28
5.5.350.0130.04020.41
5.5.340.0070.07318.02
5.5.330.0070.04720.36
5.5.320.0600.06720.28
5.5.310.0270.08020.16
5.5.300.0030.08018.03
5.5.290.0130.06718.02
5.5.280.0100.09020.88
5.5.270.0100.04720.79
5.5.260.0100.06720.84
5.5.250.0070.08020.65
5.5.240.0300.07320.14

preferences:
53.09 ms | 401 KiB | 5 Q