3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tempToken = "1b76364f-ce5a-435a-94ad-8235e379c452972e0d26-c8da-4289-ab14-8c01165106e4"; $clearText = "AuthToken=1b76364f-ce5a-435a-94ad-8235e379c452972e0d26-c8da-4289-ab14-8c01165106e4&PayerId=7197202092114251&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); // 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("M", $pad); 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); // 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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0000.01216.95
7.2.00.0070.00719.50
7.1.200.0100.00315.64
7.1.100.0040.00717.80
7.1.70.0030.00617.15
7.1.60.0140.01119.70
7.1.50.0070.01816.93
7.1.00.0100.06322.43
7.0.200.0070.00716.54
7.0.140.0030.07322.08
7.0.60.0070.06020.04
7.0.50.0000.06017.88
7.0.40.0000.05020.07
7.0.30.0430.04320.17
7.0.20.0200.06320.02
7.0.10.0270.04320.21
7.0.00.0130.05720.07
5.6.280.0070.07320.78
5.6.210.0100.08320.43
5.6.200.0070.08718.18
5.6.190.0030.05720.67
5.6.180.0100.07720.68
5.6.170.0470.07020.52
5.6.160.0070.04020.44
5.6.150.0130.07018.09
5.6.140.0000.04018.17
5.6.130.0100.03318.19
5.6.120.0070.09321.07
5.6.110.0170.07720.91
5.6.100.0030.04021.05
5.6.90.0130.06021.19
5.6.80.0000.04320.54
5.5.350.0070.08020.41
5.5.340.0000.09017.89
5.5.330.0170.05020.23
5.5.320.0330.04320.51
5.5.310.0200.06020.34
5.5.300.0000.06317.92
5.5.290.0030.04017.89
5.5.280.0030.09020.88
5.5.270.0030.06720.84
5.5.260.0000.09020.96
5.5.250.0170.07720.49
5.5.240.0070.08320.30
5.4.450.0300.03019.50
5.4.440.0570.04719.49
5.4.430.0600.02719.13
5.4.420.0370.04019.46
5.4.410.0270.04019.48
5.4.400.0200.04019.07
5.4.390.0370.03743.92
5.4.380.0100.05718.53
5.4.370.0130.05318.68
5.4.360.0170.04718.68
5.4.350.0130.05318.53
5.4.340.0130.05318.68
5.4.320.0060.03812.46
5.4.310.0070.04612.45
5.4.300.0070.03912.46
5.4.290.0090.04612.46
5.4.280.0060.03512.35
5.4.270.0070.05012.35
5.4.260.0080.04312.35
5.4.250.0050.04112.35
5.4.240.0040.03812.35
5.4.230.0080.03512.34
5.4.220.0100.03212.34
5.4.210.0080.03312.34
5.4.200.0060.03712.34
5.4.190.0080.03412.34
5.4.180.0060.03512.34
5.4.170.0090.03312.36
5.4.160.0060.03512.35
5.4.150.0040.03712.34
5.4.140.0100.03312.03
5.4.130.0020.03812.02
5.4.120.0060.04811.98
5.4.110.0080.03311.97
5.4.100.0070.03311.97
5.4.90.0140.04111.97
5.4.80.0110.03811.97
5.4.70.0040.04111.96
5.4.60.0040.04311.97
5.4.50.0050.03611.96
5.4.40.0070.04611.95
5.4.30.0070.03311.95
5.4.20.0070.04611.95
5.4.10.0060.03411.95
5.4.00.0110.03411.44
5.3.290.0050.04912.80
5.3.280.0070.05312.70
5.3.270.0080.04612.72
5.3.260.0060.04012.72
5.3.250.0070.03912.72
5.3.240.0060.03612.72
5.3.230.0060.04512.71
5.3.220.0040.03912.68
5.3.210.0060.04012.68
5.3.200.0070.04112.68
5.3.190.0040.03812.68
5.3.180.0030.03812.67
5.3.170.0040.03812.67
5.3.160.0110.03412.67
5.3.150.0080.04212.68
5.3.140.0080.04412.66
5.3.130.0090.03612.66
5.3.120.0040.04012.66
5.3.110.0050.03912.66
5.3.100.0070.03512.12
5.3.90.0110.04712.08
5.3.80.0040.05112.08
5.3.70.0110.03112.08
5.3.60.0050.04312.07
5.3.50.0080.03912.00
5.3.40.0070.03612.00
5.3.30.0050.03511.95
5.3.20.0060.04211.73
5.3.10.0040.03611.70
5.3.00.0080.05011.68
5.2.170.0030.0329.19
5.2.160.0060.0289.19
5.2.150.0060.0349.19
5.2.140.0070.0329.18
5.2.130.0050.0299.14
5.2.120.0080.0249.15
5.2.110.0070.0349.15
5.2.100.0050.0299.14
5.2.90.0080.0349.14
5.2.80.0060.0289.13
5.2.70.0050.0299.14
5.2.60.0060.0279.09
5.2.50.0070.0379.06
5.2.40.0040.0299.04
5.2.30.0050.0299.01
5.2.20.0040.0299.00
5.2.10.0070.0248.92
5.2.00.0050.0408.78
5.1.60.0060.0348.07
5.1.50.0070.0298.07
5.1.40.0070.0298.05
5.1.30.0060.0238.40
5.1.20.0010.0318.42
5.1.10.0080.0218.14
5.1.00.0060.0238.15
5.0.50.0080.0286.63
5.0.40.0040.0296.50
5.0.30.0030.0316.31
5.0.20.0020.0206.28
5.0.10.0030.0266.26
5.0.00.0040.0306.25
4.4.90.0030.0324.77
4.4.80.0030.0154.75
4.4.70.0050.0184.76
4.4.60.0040.0184.76
4.4.50.0030.0154.77
4.4.40.0020.0374.71
4.4.30.0020.0164.76
4.4.20.0050.0234.84
4.4.10.0020.0164.84
4.4.00.0030.0314.76
4.3.110.0040.0204.67
4.3.100.0020.0164.66
4.3.90.0020.0154.63
4.3.80.0060.0214.58
4.3.70.0020.0154.63
4.3.60.0010.0164.63
4.3.50.0050.0304.63
4.3.40.0020.0234.54
4.3.30.0040.0223.30
4.3.20.0040.0143.27
4.3.10.0020.0163.23
4.3.00.0030.01343.92