3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mac($msg) { $key = "7h3_1337_k3y"; $nonce = "5uc3m01"; $bloc_size = 64; if(strlen($msg)==$bloc_size) { print("cas2"); $mac = $msg; } else if(strlen($msg)>$bloc_size) { print("cas3"); $mac = hash_hmac("sha512",$msg.$nonce,$key,true); } return crypt($mac,'$6$rounds=5000$OhMyG05h!'); } $lemessage="UNMESSAGEASSEZGRANDPOURTOMBERDANSLECASDUCALCULDEHASHMAPETPOUVOIRREJOURSONMACPOURTOMBERDANSLECASCRYPTODIRECT"; $mac = mac($lemessage); $valuemac=hash_hmac("sha512",$lemessage.$nonce,$key,true); $mac2=eval('return hex2bin(\$valuemac);'); $b=mac($mac2); if($mac==$b) { print("OK"); } else{ print("KO"); } print($mac); print($b);

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.0140.01716.63
8.3.50.0170.01221.18
8.3.40.0120.00918.89
8.3.30.0090.01318.84
8.3.20.0030.00820.34
8.3.10.0160.00321.85
8.3.00.0060.00623.65
8.2.180.0090.01816.88
8.2.170.0100.02018.74
8.2.160.0170.01422.96
8.2.150.0080.00324.18
8.2.140.0000.01124.66
8.2.130.0000.01219.64
8.2.120.0080.00426.35
8.2.110.0070.00721.11
8.2.100.0080.00817.97
8.2.90.0060.00619.17
8.2.80.0040.00817.97
8.2.70.0030.00917.63
8.2.60.0000.01317.80
8.2.50.0040.01118.07
8.2.40.0030.00918.16
8.2.30.0070.00717.95
8.2.20.0060.00617.75
8.2.10.0000.01418.13
8.2.00.0030.00918.01
8.1.280.0130.01025.92
8.1.270.0000.01223.99
8.1.260.0030.01228.09
8.1.250.0040.00828.09
8.1.240.0030.00922.68
8.1.230.0060.00917.77
8.1.220.0040.00817.79
8.1.210.0030.01018.77
8.1.200.0040.01117.47
8.1.190.0030.01017.23
8.1.180.0030.01018.10
8.1.170.0000.01218.47
8.1.160.0060.00618.90
8.1.150.0090.00318.95
8.1.140.0060.01019.64
8.1.130.0000.01117.71
8.1.120.0060.00617.46
8.1.110.0030.00917.38
8.1.100.0000.01217.47
8.1.90.0040.00817.37
8.1.80.0000.01117.38
8.1.70.0040.00717.38
8.1.60.0090.00317.58
8.1.50.0100.00317.34
8.1.40.0000.01217.53
8.1.30.0060.00617.52
8.1.20.0000.01217.62
8.1.10.0000.01317.44
8.1.00.0030.00917.39
8.0.300.0040.00818.77
8.0.290.0030.01016.75
8.0.280.0040.00718.46
8.0.270.0060.00517.14
8.0.260.0000.01017.27
8.0.250.0060.00617.05
8.0.240.0060.00617.01
8.0.230.0040.00716.93
8.0.220.0000.01117.00
8.0.210.0040.00716.88
8.0.200.0040.00717.02
8.0.190.0000.01217.05
8.0.180.0000.01217.02
8.0.170.0030.01016.96
8.0.160.0080.00316.95
8.0.150.0000.01216.82
8.0.140.0060.01216.83
8.0.130.0000.01013.48
8.0.120.0060.00616.80
8.0.110.0070.00716.97
8.0.100.0080.00416.97
8.0.90.0030.00816.87
8.0.80.0040.02216.96
8.0.70.0000.01116.96
8.0.60.0000.01216.84
8.0.50.0030.00916.82
8.0.30.0090.01616.91
8.0.20.0110.01417.40
8.0.10.0000.01216.96
8.0.00.0120.01716.81
7.4.330.0030.00616.79
7.4.320.0030.00716.48
7.4.300.0030.01216.50
7.4.290.0070.00716.53
7.4.280.0070.01116.50
7.4.270.0040.00816.43
7.4.260.0080.00416.51
7.4.250.0030.00816.58
7.4.240.0040.00716.52
7.4.230.0040.00716.60
7.4.220.0160.01316.61
7.4.210.0110.02116.49
7.4.200.0040.00716.60
7.4.160.0130.01316.40
7.4.150.0120.01417.40
7.4.140.0060.02417.86
7.4.130.0080.02216.56
7.4.120.0060.02116.73
7.4.110.0120.01816.59
7.4.100.0060.02216.63
7.4.90.0040.02216.47
7.4.80.0100.01319.39
7.4.70.0120.01216.52
7.4.60.0100.01316.60
7.4.50.0150.00616.45
7.4.40.0140.01116.66
7.4.30.0060.01916.46
7.4.00.0030.01815.00
7.3.330.0050.00513.39
7.3.320.0030.00613.26
7.3.310.0040.00716.29
7.3.300.0040.00716.43
7.3.290.0000.01216.38
7.3.280.0160.01916.45
7.3.270.0090.01617.40
7.3.260.0160.00816.48
7.3.250.0090.01616.41
7.3.240.0080.01816.48
7.3.230.0120.01216.58
7.3.210.0140.01116.58
7.3.200.0040.01919.39
7.3.190.0060.01916.53
7.3.180.0130.01616.38
7.3.170.0120.01216.44
7.3.160.0030.02416.35
7.3.00.0040.01416.69
7.2.330.0030.02416.86
7.2.320.0090.02216.53
7.2.310.0170.01416.45
7.2.300.0080.01916.78
7.2.290.0090.02316.56
7.2.130.0000.02216.90
7.2.120.0130.01016.92
7.2.110.0060.01916.90
7.2.100.0060.01616.65
7.2.90.0100.01316.79
7.2.80.0060.01016.80
7.2.70.0100.01317.03
7.2.60.0090.01216.80
7.2.50.0090.00917.07
7.2.40.0000.02216.50
7.2.30.0030.01716.84
7.2.20.0090.01216.85
7.2.10.0070.01416.95
7.2.00.0120.01617.92
7.1.250.0040.01415.86
7.1.240.0060.01215.82
7.1.230.0090.01215.98
7.1.220.0100.01415.66
7.1.210.0130.00615.77
7.1.200.0090.01115.58
7.1.190.0040.01116.01
7.1.180.0000.01515.63
7.1.170.0080.01215.48
7.1.160.0030.01715.89
7.1.150.0060.01315.64
7.1.140.0120.01215.71
7.1.130.0070.01015.48
7.1.120.0080.01215.46
7.1.110.0070.01015.87
7.1.100.0060.01216.99
7.1.90.0040.01415.98
7.1.80.0120.00615.92
7.1.70.0040.01116.56
7.1.60.0030.02217.41
7.1.50.0080.01716.42
7.1.40.0060.01415.57
7.1.30.0070.01615.52
7.1.20.0030.01315.63
7.1.10.0040.01515.78
7.1.00.0000.05419.02
7.0.330.0100.01015.14
7.0.320.0070.01015.08
7.0.310.0110.01115.43
7.0.300.0040.01415.28
7.0.290.0090.00915.15
7.0.280.0030.01515.16
7.0.270.0060.00915.24
7.0.260.0100.01015.02
7.0.250.0060.01315.23
7.0.240.0030.01315.28
7.0.230.0070.01415.24
7.0.220.0000.01615.16
7.0.210.0070.01115.21
7.0.200.0140.01415.10
7.0.190.0040.01415.43
7.0.180.0070.01315.28
7.0.170.0040.01515.29
7.0.160.0090.00915.49
7.0.150.0060.01315.13
7.0.140.0030.01415.14
7.0.130.0070.01015.49
7.0.120.0030.01615.27
7.0.110.0070.01415.17
7.0.100.0030.01315.34
7.0.90.0030.01215.21
7.0.80.0030.01715.52
7.0.70.0070.01115.47
7.0.60.0000.05418.50
7.0.50.0070.04616.48
7.0.40.0030.05316.79
7.0.30.0190.03716.92
7.0.20.0170.05016.75
7.0.10.0030.05816.76
7.0.00.0100.05016.72
5.6.380.0100.01314.29
5.6.370.0000.02314.34
5.6.360.0040.01913.89
5.6.350.0000.01714.27
5.6.340.0070.01714.03
5.6.330.0000.02214.05
5.6.320.0040.02114.34
5.6.310.0100.02314.23
5.6.300.0030.01714.34
5.6.290.0030.01614.21
5.6.280.0030.02817.65
5.6.270.0100.01714.18
5.6.260.0000.02314.49
5.6.250.0110.01414.45
5.6.240.0040.02214.52
5.6.230.0120.01514.50
5.6.220.0030.02114.46
5.6.210.0050.05817.41
5.6.200.0070.04316.16
5.6.190.0090.03917.43
5.6.180.0230.03817.40
5.6.170.0100.03417.50
5.6.160.0050.03517.29
5.6.150.0030.05516.33
5.6.140.0080.03516.18
5.6.130.0050.04816.24
5.6.120.0050.05417.68
5.6.110.0030.05617.53
5.6.100.0030.03517.50
5.6.90.0070.04017.62
5.6.80.0070.05617.16
5.6.70.0070.01714.23
5.6.60.0030.01614.21
5.6.50.0030.01914.06
5.6.40.0030.02114.34
5.6.30.0090.01214.07
5.6.20.0130.00614.34
5.6.10.0060.02314.20
5.6.00.0080.01514.32
5.5.380.0070.01011.18
5.5.370.0070.01611.18
5.5.360.0060.01211.25
5.5.350.0150.05915.70
5.5.340.0090.05414.54
5.5.330.0100.03315.78
5.5.320.0190.03315.74
5.5.310.0130.03015.69
5.5.300.0070.05114.66
5.5.290.0100.03014.66
5.5.280.0070.04815.83
5.5.270.0030.03415.98
5.5.260.0080.05715.89
5.5.250.0050.05115.88
5.5.240.0100.05215.62
5.5.230.0030.02111.00
5.5.220.0040.01111.00
5.5.210.0030.01311.26
5.5.200.0040.01911.09
5.5.190.0090.00911.31
5.5.180.0030.01911.08
5.5.170.0030.01811.23
5.5.160.0000.01611.00
5.5.150.0030.01811.02
5.5.140.0040.01811.00
5.5.130.0030.01911.00
5.5.120.0000.01411.00
5.5.110.0030.01711.08
5.5.100.0030.01611.05
5.5.90.0080.01111.11
5.5.80.0070.01711.30
5.5.70.0000.01411.04
5.5.60.0030.01811.00
5.5.50.0030.01611.00
5.5.40.0000.02111.04
5.5.30.0100.01011.25
5.5.20.0040.01511.12
5.5.10.0030.01911.00
5.5.00.0030.01711.11

preferences:
67.57 ms | 401 KiB | 5 Q