3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('SECRET', 'private-key'); $payload = [ "id" => 1, "username" => "test@example.com", "created_at" => "2018-10-11 13:30:29", "updated_at" => "2018-10-17 11:17:14" ]; echo verifySignature(SECRET, 'https://example.com/webhook', $payload, 1517949000); function verifySignature(string $secret, string $webhookUrl, array $payload, int $timestamp): string { $jsonPayload = json_encode($payload); $stringToSign = "NORDWL-HMAC-SHA256\n"; $stringToSign .= sprintf("Timestamp %d\n", $timestamp); $stringToSign .= hash('sha256', $jsonPayload); $timestampKey = hash_hmac('sha256', $timestamp, 'NORDWL' . $secret, true); $signingKey = hash_hmac('sha256', $webhookUrl, $timestampKey, true); return hash_hmac('sha256', $stringToSign, $signingKey); }

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.0060.00918.55
8.3.50.0100.00718.20
8.3.40.0120.00418.59
8.3.30.0040.01218.84
8.3.20.0040.00419.18
8.3.10.0030.00521.54
8.3.00.0080.00020.69
8.2.180.0110.01116.63
8.2.170.0090.00922.96
8.2.160.0070.00722.26
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0080.00018.16
8.2.120.0040.00426.35
8.2.110.0070.00320.97
8.2.100.0060.00617.53
8.2.90.0000.00819.63
8.2.80.0040.00418.04
8.2.70.0030.00618.00
8.2.60.0040.00418.22
8.2.50.0030.00618.10
8.2.40.0080.00019.50
8.2.30.0000.00819.21
8.2.20.0000.00718.09
8.2.10.0040.00418.15
8.2.00.0030.00617.68
8.1.280.0160.00925.92
8.1.270.0000.00818.87
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.01323.89
8.1.230.0040.00722.75
8.1.220.0040.00417.78
8.1.210.0050.00318.77
8.1.200.0000.01117.35
8.1.190.0050.00317.36
8.1.180.0000.00718.10
8.1.170.0000.00818.61
8.1.160.0000.00718.93
8.1.150.0040.00418.97
8.1.140.0030.00522.19
8.1.130.0030.00320.29
8.1.120.0000.00717.43
8.1.110.0040.00417.53
8.1.100.0000.00817.53
8.1.90.0040.00317.37
8.1.80.0000.00717.48
8.1.70.0030.00317.39
8.1.60.0050.00317.62
8.1.50.0040.00417.59
8.1.40.0040.00417.43
8.1.30.0040.00417.72
8.1.20.0040.00417.67
8.1.10.0000.00817.63
8.1.00.0000.00817.60
8.0.300.0000.00821.59
8.0.290.0080.00016.63
8.0.280.0030.00318.48
8.0.270.0030.00317.21
8.0.260.0040.00418.51
8.0.250.0070.00016.88
8.0.240.0070.00016.88
8.0.230.0030.00316.97
8.0.220.0060.00316.86
8.0.210.0000.00716.91
8.0.200.0070.00016.88
8.0.190.0080.00016.99
8.0.180.0030.00616.84
8.0.170.0000.00916.93
8.0.160.0040.00416.93
8.0.150.0000.00716.86
8.0.140.0000.00716.88
8.0.130.0000.00613.40
8.0.120.0030.00516.76
8.0.110.0040.00416.87
8.0.100.0040.00417.03
8.0.90.0040.00416.77
8.0.80.0110.00916.91
8.0.70.0040.00416.79
8.0.60.0040.00416.90
8.0.50.0020.00516.79
8.0.30.0130.00417.25
8.0.20.0130.00617.40
8.0.10.0000.00817.06
8.0.00.0090.01016.73
7.4.330.0000.00515.55
7.4.320.0030.00316.44
7.4.300.0060.00016.64
7.4.290.0030.00316.43
7.4.280.0040.00416.60
7.4.270.0030.00616.58
7.4.260.0070.00016.54
7.4.250.0070.00016.42
7.4.240.0030.00316.46
7.4.230.0070.00016.52
7.4.220.0070.00016.34
7.4.210.0040.01316.51
7.4.200.0030.00316.56
7.4.160.0070.00816.55
7.4.140.0100.00817.86
7.4.130.0060.01116.53
7.4.120.0080.01016.55
7.4.110.0090.00916.46
7.4.100.0060.01316.51
7.4.90.0100.00716.44
7.4.80.0100.01319.39
7.4.70.0030.01316.59
7.4.60.0060.00916.60
7.4.50.0110.00416.39
7.4.40.0100.00616.44
7.4.00.0070.01014.89
7.3.330.0000.00513.27
7.3.320.0000.00613.36
7.3.310.0030.00616.35
7.3.300.0050.00316.34
7.3.290.0030.00316.29
7.3.280.0100.00516.29
7.3.260.0100.00816.47
7.3.240.0100.00816.46
7.3.230.0090.00916.39
7.3.210.0060.01016.63
7.3.200.0120.00416.22
7.3.190.0110.00616.67
7.3.180.0170.00716.30
7.3.170.0130.00916.48
7.3.160.0100.00616.30
7.3.120.0090.00914.72
7.3.110.0030.00714.64
7.3.100.0070.01414.96
7.3.90.0100.00714.93
7.3.80.0090.00314.95
7.3.70.0000.01215.00
7.3.60.0070.01014.82
7.3.50.0130.00314.99
7.3.40.0120.00314.82
7.3.30.0060.00914.81
7.3.20.0040.01116.27
7.3.10.0060.00916.47
7.3.00.0030.00916.56
7.2.330.0030.01316.75
7.2.320.0070.01316.72
7.2.310.0030.02516.75
7.2.300.0130.00316.80
7.2.290.0080.01316.78
7.2.250.0030.01315.18
7.2.240.0060.01215.06
7.2.230.0120.00615.24
7.2.220.0040.00814.87
7.2.210.0080.00815.04
7.2.200.0070.01115.06
7.2.190.0150.00315.10
7.2.180.0090.00014.82
7.2.170.0100.00315.16
7.2.160.0000.01515.08
7.2.150.0080.00816.73
7.2.140.0090.00616.70
7.2.130.0030.00916.86
7.2.120.0080.00516.98
7.2.110.0140.00615.85
7.2.100.0140.00315.63
7.2.90.0140.00715.87
7.2.80.0070.01515.65
7.2.70.0150.00816.06
7.2.60.0110.00916.06
7.2.50.0110.00716.01
7.2.40.0140.00715.99
7.2.30.0140.00916.07
7.2.20.0180.00815.99
7.2.10.0120.00916.05
7.2.00.0130.00916.01
7.1.330.0040.01116.01
7.1.320.0060.01015.98
7.1.310.0070.00715.93
7.1.300.0040.01216.01
7.1.290.0040.00715.64
7.1.280.0110.00415.52
7.1.270.0000.00915.81
7.1.260.0030.01015.60
7.1.250.0070.00715.79
7.1.230.0160.00713.80
7.1.220.0180.00713.63
7.1.210.0280.00313.98
7.1.200.0270.00013.57
7.1.190.0110.01513.98
7.1.180.0240.00314.02
7.1.170.0230.00413.75
7.1.160.0230.00714.03
7.1.150.0260.00313.69
7.1.140.1280.00313.88
7.1.130.0180.00713.87
7.1.120.0190.00613.99
7.1.110.0190.00714.00
7.1.100.0250.00613.96
7.1.90.0270.00714.08
7.1.80.0180.00614.03
7.1.70.0240.00713.64
7.1.60.0430.00031.88
7.1.50.0330.01031.84
7.1.40.0440.01031.62
7.1.30.0380.00931.92
7.1.20.0390.00931.89
7.1.10.0270.00313.86
7.1.00.0230.00313.98
5.6.380.0120.00314.22

preferences:
39.85 ms | 401 KiB | 5 Q