3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tempToken = "f1872bd0-1b5d-4064-9039-82bfbdd604dae6ad4502-7f41-40f8-9ac1-bd9f9d80eae6"; $clearText = "AuthToken=f1872bd0-1b5d-4064-9039-82bfbdd604dae6ad4502-7f41-40f8-9ac1-bd9f9d80eae6&PayerId=1810276278322547&PaymentProcessType=CreditCard&ProcessMethod=None&PaymentMethodStorageOption=None&ReturnURL=https://il01addproc.propay.com:443/Return.aspx "; // $tempToken = "1f25d31c-e8fe-4d68-be73-f7b439bfa0a329e90de6-4e93-4374-8633-22cef77467f5"; // $clearText = "AuthToken=1f25d31c-e8fe-4d68-be73-f7b439bfa0a329e90de6-4e93-4374-8633-22cef77467f5&PayerID=2833955147881261&Amount=10.00&CurrencyCode=USD&ProcessMethod=Capture&PaymentMethodStorageOption=None&InvoiceNumber=Invoice123&Comment1=comment1&Comment2=comment2&echo=echotest&ReturnURL=https://il01addproc.propay.com:443/Return.aspx&ProfileId=3351&PaymentProcessType=CreditCard&StandardEntryClassCode=&DisplayMessage=True&Protected=False"; // Encode the TempToken string in UTF-8 $encodedTempToken = utf8_encode($tempToken); // Get the MD5 hash of $encodedTempToken in raw binary format with a length of 16 $md5Hash = md5($encodedTempToken, TRUE); // Encode the name value string in UTF-8 $encodedNameValueString = utf8_encode($clearText); echo strlen($encodedNameValueString) . "\n"; // Pad the name value string using pkcs5_pad $blocksize = mcrypt_get_block_size('rijndael_128', 'cbc'); $pad = $blocksize - (strlen($encodedNameValueString) % $blocksize); $encodedNameValueString = $encodedNameValueString . str_repeat("X", $pad); echo strlen($encodedNameValueString) . "\n"; echo $encodedNameValueString; echo "\n"; // Use AES-128 encryption to encrypt the name value string with the key and IV both being equal to the MD5 hash of $encodedTempToken $aes128 = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $md5Hash, $encodedNameValueString, MCRYPT_MODE_CBC, $md5Hash); echo $aes128; echo "\n"; // Use Base64 encoding to send the resulting bytes of the encrypted name value string $settingsCipher = base64_encode($aes128); echo $settingsCipher;

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.0060.01316.49
8.3.50.0090.00622.01
8.3.40.0070.00718.67
8.3.30.0040.01119.13
8.3.20.0040.00420.22
8.3.10.0040.00423.71
8.3.00.0040.00419.56
8.2.180.0090.01216.75
8.2.170.0120.00322.96
8.2.160.0030.01020.43
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0050.00321.03
8.2.110.0070.00419.39
8.2.100.0080.00417.69
8.2.90.0040.00419.26
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0040.00418.03
8.2.50.0040.00418.10
8.2.40.0000.00819.95
8.2.30.0040.00418.24
8.2.20.0040.00417.80
8.2.10.0000.00817.99
8.2.00.0000.00819.53
8.1.280.0180.00025.92
8.1.270.0080.00023.86
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00422.43
8.1.230.0050.00517.82
8.1.220.0050.00317.79
8.1.210.0050.00318.77
8.1.200.0000.00917.38
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0090.00018.59
8.1.160.0050.00322.00
8.1.150.0040.00418.86
8.1.140.0000.00817.40
8.1.130.0050.00217.81
8.1.120.0070.00017.35
8.1.110.0030.00517.45
8.1.100.0000.00817.45
8.1.90.0000.00717.36
8.1.80.0000.00717.47
8.1.70.0000.00717.36
8.1.60.0030.00617.57
8.1.50.0000.00817.43
8.1.40.0000.00717.52
8.1.30.0060.00317.53
8.1.20.0000.00717.65
8.1.10.0030.00517.57
8.1.00.0040.00417.49
8.0.300.0000.00818.77
8.0.290.0040.00416.88
8.0.280.0050.00318.30
8.0.270.0030.00317.26
8.0.260.0060.00017.29
8.0.250.0030.00317.04
8.0.240.0070.00316.89
8.0.230.0080.00017.04
8.0.220.0040.00416.98
8.0.210.0030.00316.83
8.0.200.0040.00417.05
8.0.190.0030.00617.05
8.0.180.0000.00717.03
8.0.170.0000.00716.85
8.0.160.0030.00516.96
8.0.150.0030.00316.82
8.0.140.0030.00516.95
8.0.130.0030.00313.34
8.0.120.0000.00816.93
8.0.110.0000.00816.92
8.0.100.0040.00416.96
8.0.90.0030.00316.73
8.0.80.0060.01016.97
8.0.70.0020.00516.91
8.0.60.0040.00416.75
8.0.50.0000.00716.82
8.0.30.0120.01216.96
8.0.20.0130.00617.40
8.0.10.0040.00416.86
8.0.00.0080.01316.74
7.4.330.0030.00315.00
7.4.320.0030.00316.48
7.4.300.0000.00616.50
7.4.290.0030.00316.59
7.4.280.0040.00416.59
7.4.270.0020.00516.63
7.4.260.0070.00416.47
7.4.250.0000.00816.37
7.4.240.0010.00616.53
7.4.230.0000.00716.61
7.4.220.0100.01616.39
7.4.210.0130.00016.43
7.4.200.0000.00716.33
7.4.160.0030.01316.50
7.4.150.0170.00717.40
7.4.140.0120.00517.86
7.4.130.0090.00716.47
7.4.120.0060.01216.51
7.4.110.0090.00916.52
7.4.100.0140.00616.58
7.4.90.0040.01416.55
7.4.80.0100.00719.39
7.4.70.0060.01316.48
7.4.60.0100.00716.51
7.4.50.0060.00316.38
7.4.40.0140.00316.39
7.4.30.0090.00616.58
7.4.00.0050.00815.07
7.3.330.0060.00013.12
7.3.320.0030.00313.26
7.3.310.0000.00616.38
7.3.300.0040.00416.20
7.3.290.0130.00716.32
7.3.280.0070.01216.29
7.3.270.0160.00717.40
7.3.260.0060.01216.69
7.3.250.0090.00916.41
7.3.240.0070.01616.37
7.3.230.0120.00916.50
7.3.210.0220.00016.36
7.3.200.0120.00319.39
7.3.190.0180.00416.39
7.3.180.0090.00916.52
7.3.170.0060.00916.34
7.3.160.0140.00616.41
7.3.120.0130.00314.90
7.2.330.0130.00616.84
7.2.320.0140.00716.80
7.2.310.0000.01616.68
7.2.300.0110.00916.79
7.2.290.0070.01016.46
7.2.60.0070.00716.75
7.2.00.0040.01419.49
7.1.200.0050.00515.86
7.1.100.0040.00718.13
7.1.70.0040.00416.86
7.1.60.0090.01519.70
7.1.50.0170.00716.77
7.1.00.0130.06722.28
7.0.200.0080.00816.77
7.0.140.0030.07321.92
7.0.60.0030.06020.05
7.0.50.0030.05718.00
7.0.40.0170.07720.31
7.0.30.0230.04320.34
7.0.20.0170.08720.21
7.0.10.0070.09020.06
7.0.00.0070.07320.20
5.6.280.0030.07720.77
5.6.210.0100.08320.72
5.6.200.0030.08318.13
5.6.190.0100.08320.66
5.6.180.0330.06720.46
5.6.170.0330.07320.67
5.6.160.0030.07320.52
5.6.150.0100.07718.24
5.6.140.0100.07318.17
5.6.130.0070.06718.19
5.6.120.0070.03721.09
5.6.110.0100.08321.04
5.6.100.0170.07721.10
5.6.90.0070.07020.97
5.6.80.0030.08320.52
5.5.350.0130.04720.38
5.5.340.0100.08018.01
5.5.330.0100.08020.48
5.5.320.0330.07720.27
5.5.310.0430.06320.32
5.5.300.0070.05018.02
5.5.290.0130.04017.93
5.5.280.0100.07320.93
5.5.270.0030.05020.86
5.5.260.0100.08021.01
5.5.250.0130.07720.74
5.5.240.0030.08020.41
5.4.450.0230.04719.49
5.4.440.0170.05019.41
5.4.430.0200.03019.48
5.4.420.0300.04319.16
5.4.410.0370.03719.48
5.4.400.0530.04019.09
5.4.390.0270.04019.13
5.4.380.0100.05718.57
5.4.370.0100.05718.52
5.4.360.0200.05718.61
5.4.350.0270.05018.59
5.4.340.0170.05318.70
5.4.320.0090.04812.46
5.4.310.0090.03812.45
5.4.300.0080.04012.46
5.4.290.0080.04612.45
5.4.280.0080.03812.35
5.4.270.0100.03212.36
5.4.260.0090.03312.36
5.4.250.0100.03212.36
5.4.240.0070.03412.35
5.4.230.0060.04312.34
5.4.220.0030.03912.35
5.4.210.0040.04312.35
5.4.200.0070.03612.34
5.4.190.0080.03412.34
5.4.180.0070.03812.34
5.4.170.0070.03412.35
5.4.160.0100.03712.35
5.4.150.0080.03912.34
5.4.140.0050.03712.03
5.4.130.0070.03712.02
5.4.120.0070.04011.98
5.4.110.0050.04111.97
5.4.100.0070.03311.97
5.4.90.0060.03611.97
5.4.80.0060.03811.97
5.4.70.0060.03511.97
5.4.60.0080.03311.97
5.4.50.0050.03611.96
5.4.40.0060.03411.95
5.4.30.0050.03611.95
5.4.20.0070.03411.95
5.4.10.0050.03611.95
5.4.00.0070.03411.44
5.3.290.0090.04512.80
5.3.280.0110.03612.71
5.3.270.0020.04212.72
5.3.260.0080.03612.72
5.3.250.0070.03512.72
5.3.240.0030.04012.71
5.3.230.0040.03912.71
5.3.220.0110.03112.68
5.3.210.0110.03812.68
5.3.200.0080.03612.68
5.3.190.0070.04012.68
5.3.180.0070.04212.68
5.3.170.0090.03712.67
5.3.160.0050.04112.67
5.3.150.0050.04212.67
5.3.140.0090.03412.66
5.3.130.0080.04612.66
5.3.120.0070.03812.66
5.3.110.0110.04912.66
5.3.100.0070.03812.12
5.3.90.0080.03412.08
5.3.80.0090.04012.08
5.3.70.0080.03812.08
5.3.60.0040.03912.07
5.3.50.0100.03412.00
5.3.40.0070.03512.00
5.3.30.0090.03111.95
5.3.20.0070.03611.73
5.3.10.0100.03411.69
5.3.00.0070.03411.68
5.2.170.0030.0319.19
5.2.160.0020.0319.19
5.2.150.0050.0319.20
5.2.140.0030.0329.18
5.2.130.0090.0359.15
5.2.120.0050.0299.15
5.2.110.0060.0289.16
5.2.100.0070.0279.14
5.2.90.0050.0289.14
5.2.80.0030.0329.14
5.2.70.0050.0309.14
5.2.60.0030.0319.09
5.2.50.0020.0399.06
5.2.40.0060.0289.04
5.2.30.0030.0329.02
5.2.20.0060.0289.00
5.2.10.0040.0298.94
5.2.00.0080.0318.80
5.1.60.0020.0298.09
5.1.50.0050.0268.08
5.1.40.0060.0238.06
5.1.30.0090.0288.41
5.1.20.0070.0278.44
5.1.10.0050.0288.16
5.1.00.0060.0278.16
5.0.50.0010.0246.65
5.0.40.0060.0196.51
5.0.30.0060.0296.33
5.0.20.0040.0196.29
5.0.10.0020.0216.27
5.0.00.0040.0356.26
4.4.90.0030.0234.78
4.4.80.0010.0174.76
4.4.70.0020.0174.75
4.4.60.0050.0134.75
4.4.50.0050.0134.76
4.4.40.0040.0274.71
4.4.30.0010.0164.76
4.4.20.0030.0234.85
4.4.10.0000.0184.85
4.4.00.0040.0264.76
4.3.110.0070.0114.67
4.3.100.0030.0204.67
4.3.90.0010.0164.63
4.3.80.0020.0244.59
4.3.70.0020.0164.63
4.3.60.0040.0144.63
4.3.50.0050.0134.63
4.3.40.0060.0214.53
4.3.30.0020.0153.31
4.3.20.0050.0133.28
4.3.10.0010.0173.25
4.3.00.0030.0209.55

preferences:
41.08 ms | 401 KiB | 5 Q