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."5uc3m01","7h3_1337_k3y",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.40.0070.02518.75
8.3.30.0130.01318.79
8.3.20.0030.00920.16
8.3.10.0000.01321.67
8.3.00.0030.01023.66
8.2.170.0120.01218.92
8.2.160.0030.02022.96
8.2.150.0030.01025.66
8.2.140.0030.01024.66
8.2.130.0070.00719.77
8.2.120.0070.00726.35
8.2.110.0060.00920.95
8.2.100.0030.01417.72
8.2.90.0090.00617.78
8.2.80.0030.01018.09
8.2.70.0040.01117.93
8.2.60.0090.00618.04
8.2.50.0060.00918.10
8.2.40.0030.01020.46
8.2.30.0000.01320.51
8.2.20.0030.01017.80
8.2.10.0000.01418.14
8.2.00.0030.01018.03
8.1.270.0030.01024.66
8.1.260.0060.00928.09
8.1.250.0030.01028.09
8.1.240.0070.01020.56
8.1.230.0070.01020.92
8.1.220.0000.01417.78
8.1.210.0040.01218.95
8.1.200.0060.00917.36
8.1.190.0100.00617.10
8.1.180.0030.01218.10
8.1.170.0000.01418.72
8.1.160.0030.01022.20
8.1.150.0030.01018.89
8.1.140.0030.01519.55
8.1.130.0000.01317.64
8.1.120.0000.01417.49
8.1.110.0000.01417.35
8.1.100.0000.01417.38
8.1.90.0000.01417.53
8.1.80.0080.00617.36
8.1.70.0040.01117.48
8.1.60.0030.01017.48
8.1.50.0030.01217.27
8.1.40.0040.01217.40
8.1.30.0060.00917.63
8.1.20.0040.01117.55
8.1.10.0040.01017.51
8.1.00.0060.00917.54
8.0.300.0060.00920.20
8.0.290.0060.00916.75
8.0.280.0030.01018.37
8.0.270.0040.01117.25
8.0.260.0030.01017.33
8.0.250.0000.01416.98
8.0.240.0030.01216.95
8.0.230.0030.01016.98
8.0.220.0040.01116.99
8.0.210.0070.00716.83
8.0.200.0030.01017.01
8.0.190.0030.01116.98
8.0.180.0000.01417.05
8.0.170.0000.01517.05
8.0.160.0000.01416.93
8.0.150.0070.00716.80
8.0.140.0060.01216.92
8.0.130.0030.01013.33
8.0.120.0070.00716.82
8.0.110.0040.01116.95
8.0.100.0050.00816.90
8.0.90.0060.01016.79
8.0.80.0030.02616.95
8.0.70.0060.00916.85
8.0.60.0070.00716.74
8.0.50.0040.01116.92
8.0.30.0070.01917.11
8.0.20.0070.02317.40
8.0.10.0000.01416.90
8.0.00.0100.02916.75
7.4.330.0030.00816.82
7.4.320.0030.00916.61
7.4.300.0070.00716.52
7.4.290.0000.01516.66
7.4.280.0060.01516.60
7.4.270.0000.01316.61
7.4.260.0060.00916.60
7.4.250.0000.01516.46
7.4.240.0070.00716.52
7.4.230.0030.01016.39
7.4.220.0060.03016.54
7.4.210.0100.02616.53
7.4.200.0030.01016.61
7.4.160.0090.01816.43
7.4.150.0170.01117.40
7.4.140.0110.02317.86
7.4.130.0100.02016.58
7.4.120.0100.02616.61
7.4.110.0090.01916.57
7.4.100.0100.02016.58
7.4.90.0060.02216.44
7.4.80.0130.01719.39
7.4.70.0170.02416.64
7.4.60.0070.02016.50
7.4.50.0070.01716.44
7.4.40.0070.02116.50
7.4.30.0140.01816.29
7.4.00.0000.02115.08
7.3.330.0030.00913.23
7.3.320.0000.01213.26
7.3.310.0070.00716.52
7.3.300.0000.01316.34
7.3.290.0030.01016.25
7.3.280.0090.02316.43
7.3.270.0100.01917.40
7.3.260.0060.02316.57
7.3.250.0060.02416.51
7.3.240.0090.02116.46
7.3.230.0160.01316.40
7.3.210.0040.02416.28
7.3.200.0030.02316.39
7.3.190.0030.02616.61
7.3.180.0090.01916.50
7.3.170.0030.02416.36
7.3.160.0060.02116.46
7.3.10.0070.01616.58
7.3.00.0030.01816.74
7.2.330.0060.03816.81
7.2.320.0110.01816.73
7.2.310.0180.02116.33
7.2.300.0160.01316.59
7.2.290.0040.02316.61
7.2.130.0050.01916.93
7.2.120.0050.01816.76
7.2.110.0070.01716.81
7.2.100.0020.02016.91
7.2.90.0040.01917.05
7.2.80.0090.01916.81
7.2.70.0070.02016.67
7.2.60.0060.01916.94
7.2.50.0090.02016.98
7.2.40.0130.01616.94
7.2.30.0070.01516.92
7.2.20.0040.01916.77
7.2.10.0060.01817.03
7.2.00.0060.01817.65
7.1.250.0060.02015.81
7.1.200.0030.01715.87
7.1.100.0320.01816.52
7.1.70.0040.01117.25
7.1.60.0110.02819.13
7.1.50.0060.02616.77
7.1.00.0070.08322.51
7.0.200.0160.01314.88
7.0.60.0100.09721.65
7.0.50.0070.05717.88
7.0.40.0200.03320.11
7.0.30.0430.07320.12
7.0.20.0270.06020.21
7.0.10.0170.08320.23
7.0.00.0000.05320.11
5.6.280.0000.04320.78
5.6.210.0070.07320.61
5.6.200.0130.08018.33
5.6.190.0030.05720.34
5.6.180.0400.06020.52
5.6.170.0200.05720.49
5.6.160.0130.08720.54
5.6.150.0100.09018.16
5.6.140.0070.09318.18
5.6.130.0070.07718.14
5.6.120.0100.09020.99
5.6.110.0100.10021.12
5.6.100.0170.06020.89
5.6.90.0170.04021.09
5.6.80.0170.07020.36
5.5.350.0300.09020.46
5.5.340.0100.07318.04
5.5.330.0130.08020.38
5.5.320.0170.05320.43
5.5.310.0270.05020.27
5.5.300.0130.08717.98
5.5.290.0100.09017.97
5.5.280.0130.09020.81
5.5.270.0000.05020.84
5.5.260.0070.10020.97
5.5.250.0070.07720.78
5.5.240.0170.08720.18

preferences:
43.54 ms | 400 KiB | 5 Q