3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt_3DES($message, $key){ // Se establece un IV por defecto $bytes = array(0,0,0,0,0,0,0,0); //byte [] IV = {0, 0, 0, 0, 0, 0, 0, 0} $iv = implode(array_map("chr", $bytes)); //PHP 4 >= 4.0.2 // Se cifra $ciphertext = mcrypt_encrypt(MCRYPT_3DES, $key, $message, MCRYPT_MODE_CBC, $iv); //PHP 4 >= 4.0.2 return $ciphertext; } function encodeBase64($data){ $data = base64_encode($data); return $data; } function decodeBase64($data){ $data = base64_decode($data); return $data; } function mac256($ent,$key){ $res = hash_hmac('sha256', $ent, $key, true);//(PHP 5 >= 5.1.2) return $res; } function createMerchantSignature($key){ // Se decodifica la clave Base64 $key = decodeBase64($key); // Se genera el parámetro Ds_MerchantParameters $ent = ""; // Se diversifica la clave con el Número de Pedido $key = encrypt_3DES('1442772645', $key); // MAC256 del parámetro Ds_MerchantParameters $res = mac256($ent, $key); // Se codifican los datos Base64 return encodeBase64($res); } $key = createMerchantSignature("Mk9m98IfEblmPfrpsawt7BmxObt98Jev"); echo $key ?>

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.00716.75
8.3.50.0150.01022.05
8.3.40.0090.00618.82
8.3.30.0070.00718.87
8.3.20.0070.00020.20
8.3.10.0040.00423.61
8.3.00.0050.00319.97
8.2.180.0040.01116.75
8.2.170.0120.00322.96
8.2.160.0150.00620.13
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00421.18
8.2.120.0000.00826.35
8.2.110.0030.00620.53
8.2.100.0000.01117.91
8.2.90.0050.00318.97
8.2.80.0050.00517.97
8.2.70.0000.00817.37
8.2.60.0030.00517.66
8.2.50.0050.00318.07
8.2.40.0050.00521.01
8.2.30.0040.00720.51
8.2.20.0000.00717.70
8.2.10.0030.00618.00
8.2.00.0040.00417.95
8.1.280.0030.01425.92
8.1.270.0080.00018.71
8.1.260.0170.00028.09
8.1.250.0040.00428.09
8.1.240.0080.00022.02
8.1.230.0040.00719.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.83
8.1.180.0050.00318.10
8.1.170.0040.00418.46
8.1.160.0000.00720.79
8.1.150.0040.00418.81
8.1.140.0000.00819.46
8.1.130.0030.00317.66
8.1.120.0000.00717.41
8.1.110.0040.00417.30
8.1.100.0030.00517.48
8.1.90.0050.00217.40
8.1.80.0000.00817.41
8.1.70.0040.00417.41
8.1.60.0040.00417.63
8.1.50.0050.00317.46
8.1.40.0060.00317.54
8.1.30.0000.00917.58
8.1.20.0050.00317.66
8.1.10.0050.00317.61
8.1.00.0070.00417.54
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.33
8.0.270.0000.00717.09
8.0.260.0000.00617.20
8.0.250.0000.00816.91
8.0.240.0070.00016.96
8.0.230.0030.00316.96
8.0.220.0040.00416.96
8.0.210.0000.00716.91
8.0.200.0030.00316.85
8.0.190.0040.00416.96
8.0.180.0040.00416.86
8.0.170.0000.00816.93
8.0.160.0040.00417.02
8.0.150.0050.00216.89
8.0.140.0040.00416.87
8.0.130.0000.00713.40
8.0.120.0040.00416.89
8.0.110.0040.00416.75
8.0.100.0000.00716.97
8.0.90.0040.00416.82
8.0.80.0110.01116.92
8.0.70.0040.00416.93
8.0.60.0000.00816.87
8.0.50.0020.00516.97
8.0.30.0120.00617.16
8.0.20.0080.01117.41
8.0.10.0040.00417.11
8.0.00.0100.00916.77
7.4.330.0060.00016.79
7.4.320.0030.00516.44
7.4.300.0070.00016.43
7.4.290.0030.00316.61
7.4.280.0030.00616.61
7.4.270.0030.00516.52
7.4.260.0040.00316.44
7.4.250.0040.00416.51
7.4.240.0020.00516.57
7.4.230.0000.00716.37
7.4.220.0060.01316.57
7.4.210.0030.01116.42
7.4.200.0070.00016.32
7.4.160.0030.01216.50
7.4.150.0000.01717.40
7.4.140.0090.00917.86
7.4.130.0100.01016.57
7.4.120.0120.00516.59
7.4.110.0070.01116.36
7.4.100.0070.01016.49
7.4.90.0090.00916.55
7.4.80.0110.01219.39
7.4.70.0120.00316.71
7.4.60.0090.00916.58
7.4.50.0030.01016.67
7.4.40.0090.00616.61
7.4.30.0090.00916.61
7.4.10.0090.00915.09
7.4.00.0100.00714.91
7.3.330.0000.00613.33
7.3.320.0030.00313.25
7.3.310.0050.00316.34
7.3.300.0030.00316.13
7.3.290.0060.01116.32
7.3.280.0090.01016.34
7.3.270.0090.00917.40
7.3.260.0180.00716.68
7.3.250.0100.01016.36
7.3.240.0100.00716.43
7.3.230.0000.02216.50
7.3.210.0060.01216.29
7.3.200.0060.01216.56
7.3.190.0060.01216.54
7.3.180.0110.00616.36
7.3.170.0130.00316.43
7.3.160.0100.00716.33
7.3.130.0130.00614.77
7.3.120.0060.01314.96
7.3.110.0030.00915.05
7.3.100.0000.01314.80
7.3.90.0000.01214.75
7.3.80.0000.01114.74
7.3.70.0030.01014.89
7.3.60.0030.00914.78
7.3.50.0000.01114.83
7.3.40.0100.00314.78
7.3.30.0000.00914.67
7.3.20.0090.00316.46
7.3.10.0100.00316.66
7.3.00.0000.01316.86
7.2.330.0080.00816.65
7.2.320.0160.00716.82
7.2.310.0030.01316.50
7.2.300.0090.01416.62
7.2.290.0160.00716.44
7.2.260.0100.01015.13
7.2.250.0070.01515.07
7.2.240.0090.00615.06
7.2.230.0040.01115.14
7.2.220.0060.00915.06
7.2.210.0090.00614.87
7.2.200.0000.01114.94
7.2.190.0030.01014.93
7.2.180.0070.01015.11
7.2.170.0030.00615.07
7.2.160.0100.00314.94
7.2.150.0000.01416.94
7.2.140.0100.00316.64
7.2.130.0070.00816.88
7.2.120.0090.00616.85
7.2.110.0000.01716.92
7.2.100.0030.00616.84
7.2.90.0030.00916.81
7.2.80.0080.00816.95
7.2.70.0100.00616.75
7.2.60.0070.00516.88
7.2.50.0070.00716.63
7.2.40.0100.00316.97
7.2.30.0030.01016.85
7.2.20.0030.00616.90
7.2.10.0030.00916.73
7.2.00.0090.00918.04
7.1.330.0070.00715.77
7.1.320.0060.01215.70
7.1.310.0060.00915.69
7.1.300.0030.00915.75
7.1.290.0050.00315.68
7.1.280.0070.00715.87
7.1.270.0100.00615.55
7.1.260.0070.00715.72
7.1.250.0040.00415.75
7.1.240.0160.00315.73
7.1.230.0040.01415.55
7.1.220.0110.00015.86
7.1.210.0070.00315.79
7.1.200.0180.00515.42
7.1.190.0040.00415.46
7.1.180.0070.00715.75
7.1.170.0070.00715.82
7.1.160.0070.00715.73
7.1.150.0030.00915.89
7.1.140.0030.01015.74
7.1.130.0060.00615.86
7.1.120.0060.00915.72
7.1.110.0090.00615.55
7.1.100.0460.00516.00
7.1.90.0040.00715.92
7.1.80.0050.00315.61
7.1.70.0030.00616.39
7.1.60.0050.01417.48
7.1.50.0070.00916.30
7.1.40.0100.00315.64
7.1.30.0060.00615.57
7.1.20.0070.00715.79
7.1.10.0030.01515.85
7.1.00.0070.03719.15
7.0.330.0060.00615.31
7.0.320.0060.00615.39
7.0.310.0030.01215.42
7.0.300.0000.00915.54
7.0.290.0070.00715.07
7.0.280.0000.00815.44
7.0.270.0060.00615.20
7.0.260.0130.00315.24
7.0.250.0030.00615.48
7.0.240.0060.00915.36
7.0.230.0100.00315.47
7.0.220.0000.01315.26
7.0.210.0090.00315.36
7.0.200.0040.00716.03
7.0.190.0030.00715.22
7.0.180.0030.00715.47
7.0.170.0070.00415.50
7.0.160.0030.01015.43
7.0.150.0090.00315.46
7.0.140.0000.01415.24
7.0.130.0130.00315.54
7.0.120.0000.01515.34
7.0.110.0080.00415.50
7.0.100.0070.00715.43
7.0.90.0080.00315.47
7.0.80.0060.00615.32
7.0.70.0040.00815.41
7.0.60.0060.04118.50
7.0.50.0030.04516.81
7.0.40.0050.03216.82
7.0.30.0230.04016.77
7.0.20.0210.03316.85
7.0.10.0070.04416.77
7.0.00.0030.04816.69
5.6.400.0060.00614.45
5.6.390.0030.01114.48
5.6.380.0030.00614.14
5.6.370.0110.00414.24
5.6.360.0000.01514.14
5.6.350.0070.01014.50
5.6.340.0070.00714.45
5.6.330.0060.00614.05
5.6.320.0110.00314.54
5.6.310.0060.00613.77
5.6.300.0060.01013.97
5.6.290.0110.00414.21
5.6.280.0060.03817.79
5.6.270.0080.00814.11
5.6.260.0030.00614.32
5.6.250.0070.00714.35
5.6.240.0030.01114.25
5.6.230.0090.00614.05
5.6.220.0000.01514.11
5.6.210.0120.02717.53
5.6.200.0030.02616.21
5.6.190.0110.02817.41
5.6.180.0300.03017.40
5.6.170.0150.04617.37
5.6.160.0070.03917.55
5.6.150.0070.04016.25
5.6.140.0030.04316.21
5.6.130.0090.04316.33
5.6.120.0050.02717.62
5.6.110.0050.03717.72
5.6.100.0070.02817.62
5.6.90.0050.04517.52
5.6.80.0080.03717.51
5.6.70.0120.00314.12
5.6.60.0040.00814.00
5.6.50.0040.01114.35
5.6.40.0030.01514.00
5.6.30.0030.00714.03
5.6.20.0050.00314.32
5.6.10.0070.00314.11
5.6.00.0100.00314.25
5.5.380.0040.00814.29
5.5.370.0100.00314.01
5.5.360.0000.01114.09
5.5.350.0230.03617.37
5.5.340.0030.02516.05
5.5.330.0020.04617.21
5.5.320.0080.04617.27
5.5.310.0210.03617.22
5.5.300.0030.02516.05
5.5.290.0050.04016.05
5.5.280.0050.02517.31
5.5.270.0050.04517.55
5.5.260.0050.04917.39
5.5.250.0060.02117.34
5.5.240.0080.04017.24
5.5.230.0000.01313.91
5.5.220.0030.00713.91
5.5.210.0000.01414.22
5.5.200.0100.00314.07
5.5.190.0060.00314.18
5.5.180.0100.00314.07
5.5.170.0040.01113.71
5.5.160.0100.00714.18
5.5.150.0000.01513.95
5.5.140.0070.00713.93
5.5.130.0000.01013.68
5.5.120.0100.00314.07
5.5.110.0090.00014.19
5.5.100.0090.00014.19
5.5.90.0000.01413.90
5.5.80.0090.00313.85
5.5.70.0080.00314.01
5.5.60.0070.00714.02
5.5.50.0060.01013.61
5.5.40.0000.01713.97
5.5.30.0040.01414.22
5.5.20.0030.00913.98
5.5.10.0030.01014.11
5.5.00.0080.00814.32

preferences:
37.7 ms | 401 KiB | 5 Q