3v4l.org

run code in 300+ PHP versions simultaneously
<?php $random = random_bytes(256); $message = 'hello'; $mac1 = hash_hmac('sha256', $message, $random); $mac2 = hash_hmac('sha256', $message, hash('sha256', $random, true)); var_dump($mac1, $mac2); $mac3 = hash_hmac('sha256', $random, $message); $mac4 = hash_hmac('sha256', $random, hash('sha256', $message, true)); var_dump($mac3, $mac4);

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.0.130.0050.00514.98
8.0.120.0100.00614.41
8.0.110.0140.00414.41
8.0.100.0140.00414.44
8.0.90.0100.00614.42
8.0.80.0150.00214.41
8.0.70.0140.00314.35
8.0.60.0120.00614.38
8.0.50.0120.00614.44
8.0.30.0150.00314.41
8.0.20.0120.00514.45
8.0.10.0140.00414.50
8.0.00.0060.00414.56
7.4.260.0140.00214.88
7.4.250.0130.00414.33
7.4.240.0190.00114.26
7.4.230.0160.00514.34
7.4.220.0090.00914.29
7.4.210.0130.00514.35
7.4.200.0180.00114.33
7.4.190.0170.00214.36
7.4.180.0130.00414.38
7.4.160.0150.00414.30
7.4.150.0120.00514.26
7.4.140.0120.00414.23
7.4.130.0110.00614.15
7.4.120.0130.00414.25
7.4.110.0110.00814.11
7.4.100.0140.00514.32
7.4.90.0150.00214.20
7.4.80.0160.00114.19
7.4.70.0130.00514.17
7.4.60.0130.00514.17
7.4.50.0140.00314.09
7.4.40.0120.00514.07
7.4.30.0150.00214.17
7.4.20.0130.00414.20
7.4.10.0130.00414.19
7.4.00.0140.00314.16
7.3.330.0080.00214.06
7.3.320.0130.00514.05
7.3.310.0130.00514.04
7.3.300.0150.00213.96
7.3.290.0100.00413.95
7.3.280.0140.00313.96
7.3.270.0160.00314.01
7.3.260.0140.00213.99
7.3.250.0130.00413.96
7.3.240.0120.00513.99
7.3.230.0110.00413.92
7.3.220.0140.00314.02
7.3.210.0130.00513.94
7.3.200.0130.00414.05
7.3.190.0080.00714.01
7.3.180.0140.00413.97
7.3.170.0180.00113.95
7.3.160.0160.00213.97
7.3.150.0100.00414.01
7.3.140.0110.00513.95
7.3.130.0100.00414.00
7.3.120.0060.00513.97
7.3.110.0150.00213.97
7.3.100.0140.00413.90
7.3.90.0100.00514.22
7.3.80.0140.00214.03
7.3.70.0140.00414.11
7.3.60.0170.00114.19
7.3.50.0140.00414.13
7.3.40.0150.00214.11
7.3.30.0160.00214.07
7.3.20.0150.00315.29
7.3.10.0160.00415.33
7.3.00.0170.00415.34

preferences:
31 ms | 403 KiB | 5 Q