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("AA");'); $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.0100.02016.63
8.3.50.0150.02321.15
8.3.40.0030.02118.79
8.3.30.0100.01618.68
8.3.20.0040.00820.34
8.3.10.0070.00722.05
8.3.00.0070.00723.70
8.2.180.0100.02325.92
8.2.170.0070.02018.93
8.2.160.0030.02022.96
8.2.150.0030.00925.66
8.2.140.0060.00624.66
8.2.130.0030.01019.64
8.2.120.0090.00926.35
8.2.110.0070.00720.53
8.2.100.0070.01117.91
8.2.90.0090.00617.63
8.2.80.0040.01117.97
8.2.70.0040.01117.80
8.2.60.0040.01117.80
8.2.50.0070.00718.10
8.2.40.0030.01020.59
8.2.30.0030.01020.69
8.2.20.0000.01417.65
8.2.10.0030.01218.18
8.2.00.0000.01418.00
8.1.280.0070.02225.92
8.1.270.0030.01324.66
8.1.260.0030.01328.09
8.1.250.0030.01028.09
8.1.240.0000.01422.46
8.1.230.0070.01019.09
8.1.220.0030.01017.88
8.1.210.0030.01218.77
8.1.200.0040.01117.35
8.1.190.0040.01117.11
8.1.180.0000.01418.10
8.1.170.0000.01418.58
8.1.160.0030.01020.68
8.1.150.0000.01418.85
8.1.140.0000.01619.61
8.1.130.0000.01317.63
8.1.120.0070.00717.48
8.1.110.0030.01017.36
8.1.100.0000.01417.53
8.1.90.0040.01117.48
8.1.80.0000.01417.45
8.1.70.0000.01317.49
8.1.60.0000.01517.57
8.1.50.0000.01517.42
8.1.40.0040.01117.52
8.1.30.0070.00717.69
8.1.20.0060.00817.49
8.1.10.0040.01117.58
8.1.00.0070.00717.39
8.0.300.0000.01419.76
8.0.290.0030.01216.88
8.0.280.0000.01318.38
8.0.270.0030.01217.33
8.0.260.0000.01317.26
8.0.250.0000.01316.98
8.0.240.0080.00817.05
8.0.230.0000.01417.07
8.0.220.0000.01516.94
8.0.210.0030.01016.94
8.0.200.0030.01017.03
8.0.190.0040.01117.03
8.0.180.0000.01416.89
8.0.170.0060.00916.81
8.0.160.0030.01216.93
8.0.150.0000.01416.79
8.0.140.0090.00916.84
8.0.130.0000.01213.43
8.0.120.0060.00916.84
8.0.110.0080.00816.99
8.0.100.0080.00517.03
8.0.90.0040.01116.85
8.0.80.0130.03016.93
8.0.70.0030.01016.90
8.0.60.0000.01517.02
8.0.50.0030.01016.96
8.0.30.0090.01916.99
8.0.20.0140.01617.40
8.0.10.0030.01017.03
8.0.00.0160.01816.85
7.4.330.0000.01116.82
7.4.320.0040.00816.53
7.4.300.0000.01716.61
7.4.290.0090.00916.59
7.4.280.0000.02116.50
7.4.270.0030.01016.54
7.4.260.0040.01516.50
7.4.250.0070.00716.57
7.4.240.0050.00916.57
7.4.230.0000.01416.50
7.4.220.0160.03916.53
7.4.210.0090.02016.61
7.4.200.0000.01416.45
7.4.160.0140.01416.53
7.4.150.0110.01817.40
7.4.140.0090.02217.86
7.4.130.0100.02316.42
7.4.120.0090.02616.46
7.4.110.0090.01916.65
7.4.100.0110.01716.62
7.4.90.0110.01816.58
7.4.80.0030.02419.39
7.4.70.0100.01916.50
7.4.60.0070.02116.50
7.4.50.0070.01816.47
7.4.40.0090.01816.47
7.4.30.0130.01616.71
7.4.00.0030.01915.04
7.3.330.0000.01113.40
7.3.320.0030.00913.29
7.3.310.0000.01416.45
7.3.300.0030.01016.43
7.3.290.0030.01016.47
7.3.280.0090.02116.41
7.3.270.0090.01917.40
7.3.260.0160.01616.38
7.3.250.0090.01916.31
7.3.240.0100.01916.52
7.3.230.0070.02316.53
7.3.210.0060.02016.62
7.3.200.0120.01519.39
7.3.190.0090.01916.56
7.3.180.0120.01516.32
7.3.170.0180.02116.50
7.3.160.0100.02916.71
7.3.10.0080.01316.60
7.3.00.0050.01716.60
7.2.330.0120.01916.79
7.2.320.0070.03316.79
7.2.310.0120.01516.79
7.2.300.0100.01816.77
7.2.290.0160.02216.53
7.2.130.0090.01616.70
7.2.120.0100.01516.95
7.2.110.0140.01316.79
7.2.100.0080.01616.74
7.2.90.0100.01516.84
7.2.80.0120.01216.75
7.2.70.0070.01716.63
7.2.60.0090.01816.81
7.2.50.0060.01716.89
7.2.40.0110.01416.75
7.2.30.0150.01316.87
7.2.20.0110.01916.80
7.2.10.0050.02316.76
7.2.00.0090.01917.62
7.1.250.0050.01615.62
7.1.200.0030.02015.78
7.1.100.0000.02617.84
7.1.70.0000.01717.28
7.1.60.0100.03019.10
7.1.50.0030.03817.06
7.1.00.0030.09022.46
7.0.200.0180.01415.03
7.0.60.0000.10321.77
7.0.50.0100.09017.89
7.0.40.0030.05020.27
7.0.30.0300.06020.13
7.0.20.0330.06320.15
7.0.10.0100.06320.10
7.0.00.0170.08320.09
5.6.280.0030.04021.08
5.6.210.0070.08020.75
5.6.200.0100.05318.13
5.6.190.0070.06320.77
5.6.180.0370.06720.61
5.6.170.0130.05320.50
5.6.160.0100.08320.61
5.6.150.0030.05718.29
5.6.140.0200.04718.14
5.6.130.0000.06318.23
5.6.120.0030.05321.15
5.6.110.0100.09020.98
5.6.100.0030.05021.01
5.6.90.0170.09021.00
5.6.80.0170.08720.38
5.5.350.0330.08720.43
5.5.340.0130.05317.95
5.5.330.0130.09320.27
5.5.320.0270.04320.34
5.5.310.0300.07720.50
5.5.300.0070.06318.03
5.5.290.0070.09318.01
5.5.280.0030.05720.91
5.5.270.0030.04720.87
5.5.260.0170.08020.87
5.5.250.0070.09320.47
5.5.240.0200.08720.36

preferences:
38.04 ms | 401 KiB | 5 Q