3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tempToken = "0d3ea4b5-dac3-4bbe-a3e9-1a162593eb3f506d2b43-0580-4ec1-aa6f-979b9b1237d4"; $clearText = "AuthToken=0d3ea4b5-dac3-4bbe-a3e9-1a162593eb3f506d2b43-0580-4ec1-aa6f-979b9b1237d4&PayerId=3254183124469122&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.0070.01016.75
8.3.50.0000.01418.28
8.3.40.0070.01118.79
8.3.30.0060.01118.89
8.3.20.0000.00820.20
8.3.10.0040.00423.48
8.3.00.0080.00019.56
8.2.180.0180.00018.18
8.2.170.0040.01122.96
8.2.160.0070.00720.43
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0040.00421.10
8.2.110.0030.00622.20
8.2.100.0030.00718.16
8.2.90.0000.00819.14
8.2.80.0080.00017.97
8.2.70.0040.00417.50
8.2.60.0060.00317.80
8.2.50.0050.00318.07
8.2.40.0000.00918.16
8.2.30.0000.00718.12
8.2.20.0000.00717.71
8.2.10.0000.00718.05
8.2.00.0050.00317.80
8.1.280.0040.01125.92
8.1.270.0090.00023.96
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00022.06
8.1.230.0080.00318.97
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0000.00917.48
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0030.00521.91
8.1.150.0000.00718.86
8.1.140.0040.00417.35
8.1.130.0050.00217.77
8.1.120.0030.00317.50
8.1.110.0020.00517.36
8.1.100.0040.00417.43
8.1.90.0000.00717.44
8.1.80.0040.00417.38
8.1.70.0000.00717.32
8.1.60.0040.00417.58
8.1.50.0080.00017.45
8.1.40.0000.00817.51
8.1.30.0080.00017.63
8.1.20.0020.00517.56
8.1.10.0040.00417.56
8.1.00.0040.00417.48
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0030.00318.35
8.0.270.0050.00217.21
8.0.260.0070.00017.21
8.0.250.0040.00416.91
8.0.240.0070.00017.00
8.0.230.0040.00416.99
8.0.220.0070.00016.86
8.0.210.0050.00316.91
8.0.200.0070.00017.03
8.0.190.0000.00716.92
8.0.180.0070.00016.97
8.0.170.0030.00516.86
8.0.160.0050.00316.90
8.0.150.0040.00416.95
8.0.140.0040.00316.89
8.0.130.0030.00313.33
8.0.120.0040.00416.96
8.0.110.0050.00316.99
8.0.100.0000.00716.89
8.0.90.0030.00316.77
8.0.80.0090.01116.84
8.0.70.0040.00416.73
8.0.60.0070.00016.84
8.0.50.0040.00416.82
8.0.30.0120.01217.14
8.0.20.0080.01117.40
8.0.10.0050.00216.98
8.0.00.0120.00516.69
7.4.330.0030.00315.15
7.4.320.0030.00316.52
7.4.300.0060.00016.35
7.4.290.0040.00416.52
7.4.280.0040.00416.57
7.4.270.0030.00316.60
7.4.260.0000.00716.38
7.4.250.0040.00416.54
7.4.240.0040.00416.53
7.4.230.0000.00716.35
7.4.220.0140.00716.61
7.4.210.0070.00716.68
7.4.200.0030.00316.46
7.4.160.0120.00616.52
7.4.150.0130.00617.40
7.4.140.0120.01917.86
7.4.130.0100.00716.56
7.4.120.0050.01516.58
7.4.110.0060.01116.32
7.4.100.0100.00716.58
7.4.90.0130.00316.49
7.4.80.0090.01219.39
7.4.70.0110.00616.55
7.4.60.0090.00616.69
7.4.50.0000.00516.58
7.4.40.0030.01616.45
7.4.30.0100.00616.74
7.4.00.0070.00714.92
7.3.330.0050.00013.16
7.3.320.0000.00713.26
7.3.310.0000.00716.39
7.3.300.0050.00316.30
7.3.290.0120.00316.27
7.3.280.0060.01216.31
7.3.270.0160.00717.40
7.3.260.0100.00716.32
7.3.250.0130.00916.48
7.3.240.0100.00616.39
7.3.230.0040.01416.39
7.3.210.0030.01916.44
7.3.200.0060.01019.39
7.3.190.0040.01116.50
7.3.180.0090.00616.28
7.3.170.0060.01016.27
7.3.160.0120.00916.57
7.3.120.0060.00914.80
7.2.330.0100.01216.82
7.2.320.0120.00816.66
7.2.310.0100.00716.77
7.2.300.0140.00316.33
7.2.290.0130.00316.48
7.2.60.0030.00916.55
7.2.00.0040.01119.43
7.1.200.0060.00915.75
7.1.100.0040.00718.14
7.1.70.0070.00017.02
7.1.60.0070.01719.70
7.1.50.0140.01016.64
7.1.00.0070.07022.57
7.0.200.0000.00914.71
7.0.140.0000.07321.97
7.0.60.0000.07319.89
7.0.50.0100.07317.87
7.0.40.0230.07020.12
7.0.30.0200.04020.05
7.0.20.0300.07720.06
7.0.10.0330.06020.16
7.0.00.0070.04320.30
5.6.280.0030.07321.02
5.6.210.0070.08720.44
5.6.200.0030.06718.20
5.6.190.0030.08020.40
5.6.180.0100.05320.45
5.6.170.0300.06720.53
5.6.160.0030.04020.41
5.6.150.0070.07718.13
5.6.140.0030.03718.11
5.6.130.0000.05018.19
5.6.120.0100.06021.02
5.6.110.0200.07021.17
5.6.100.0030.04021.01
5.6.90.0130.07321.00
5.6.80.0030.03720.57
5.6.70.0300.07020.51
5.5.350.0000.07020.42
5.5.340.0070.08318.00
5.5.330.0100.07020.19
5.5.320.0400.07320.35
5.5.310.0100.04720.30
5.5.300.0030.04318.04
5.5.290.0070.03717.92
5.5.280.0070.08320.94
5.5.270.0030.04320.94
5.5.260.0070.08020.91
5.5.250.0000.06320.52
5.5.240.0030.07720.27
5.4.450.0430.03719.43
5.4.440.0700.06019.22
5.4.430.0230.04719.45
5.4.420.0300.03019.40
5.4.410.0630.03719.28
5.4.400.0270.04043.99
5.4.390.0170.05043.92
5.4.380.0100.05318.61
5.4.370.0130.05318.57
5.4.360.0070.06018.50
5.4.350.0100.06318.75
5.4.340.0200.04318.69
5.4.320.0060.03512.46
5.4.310.0090.04012.46
5.4.300.0060.03612.46
5.4.290.0070.03612.46
5.4.280.0070.03312.36
5.4.270.0050.03612.36
5.4.260.0090.03912.35
5.4.250.0080.04212.36
5.4.240.0110.03612.36
5.4.230.0040.03912.35
5.4.220.0080.03312.34
5.4.210.0050.03812.34
5.4.200.0050.03812.34
5.4.190.0050.04012.34
5.4.180.0130.05012.34
5.4.170.0070.03912.36
5.4.160.0050.03912.35
5.4.150.0050.03912.35
5.4.140.0060.03812.03
5.4.130.0050.03612.02
5.4.120.0070.03911.98
5.4.110.0060.03411.97
5.4.100.0050.04011.97
5.4.90.0030.03911.97
5.4.80.0070.04211.97
5.4.70.0060.03411.97
5.4.60.0020.03911.96
5.4.50.0050.03611.96
5.4.40.0060.03411.95
5.4.30.0050.03511.95
5.4.20.0060.03411.95
5.4.10.0060.04311.95
5.4.00.0050.04211.45
5.3.290.0090.04412.80
5.3.280.0070.03612.71
5.3.270.0060.03812.72
5.3.260.0070.03712.72
5.3.250.0070.03612.71
5.3.240.0070.03612.72
5.3.230.0060.03812.71
5.3.220.0060.03712.68
5.3.210.0040.04112.68
5.3.200.0060.03512.68
5.3.190.0030.04112.68
5.3.180.0040.04012.68
5.3.170.0070.03412.67
5.3.160.0080.03912.67
5.3.150.0060.03612.67
5.3.140.0070.04112.66
5.3.130.0070.03712.66
5.3.120.0080.03612.65
5.3.110.0070.03712.66
5.3.100.0080.03512.12
5.3.90.0070.03412.09
5.3.80.0080.03412.07
5.3.70.0070.04112.07
5.3.60.0060.03912.06
5.3.50.0050.04712.00
5.3.40.0030.03912.00
5.3.30.0040.03611.95
5.3.20.0040.03711.73
5.3.10.0030.03711.69
5.3.00.0070.03411.68
5.2.170.0050.0299.19
5.2.160.0040.0379.18
5.2.150.0050.0349.19
5.2.140.0040.0309.18
5.2.130.0060.0279.15
5.2.120.0050.0289.15
5.2.110.0040.0299.15
5.2.100.0070.0259.14
5.2.90.0040.0299.15
5.2.80.0040.0329.14
5.2.70.0040.0339.14
5.2.60.0040.0309.10
5.2.50.0040.0319.06
5.2.40.0050.0309.04
5.2.30.0030.0309.02
5.2.20.0040.0309.00
5.2.10.0040.0288.94
5.2.00.0040.0288.80
5.1.60.0030.0248.09
5.1.50.0030.0258.08
5.1.40.0060.0238.06
5.1.30.0060.0238.41
5.1.20.0040.0308.43
5.1.10.0080.0358.16
5.1.00.0040.0258.16
5.0.50.0020.0216.65
5.0.40.0040.0186.51
5.0.30.0040.0316.33
5.0.20.0050.0186.29
5.0.10.0050.0236.27
5.0.00.0040.0316.26
4.4.90.0020.0164.78
4.4.80.0040.0144.76
4.4.70.0030.0184.75
4.4.60.0030.0184.76
4.4.50.0020.0154.77
4.4.40.0030.0244.71
4.4.30.0040.0134.76
4.4.20.0000.0224.84
4.4.10.0020.0164.85
4.4.00.0030.0264.76
4.3.110.0020.0164.67
4.3.100.0020.0154.67
4.3.90.0030.0214.63
4.3.80.0010.0254.58
4.3.70.0040.0214.63
4.3.60.0030.0204.63
4.3.50.0010.0174.63
4.3.40.0040.0224.54
4.3.30.0030.0163.30
4.3.20.0030.0143.29
4.3.10.0020.0243.25
4.3.00.0100.01743.92

preferences:
41.5 ms | 400 KiB | 5 Q