3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * PHP mcrypt - Basic encryption and decryption of a string */ $string = "Some text to be encrypted"; $secret_key = "This is my secret key"; $encrypted_string1 ="Eg3sU9wCCcqEs2a22g1aCQcEU8ea5QmmOEakamskkQQ177a3Cec13k1QKEOa95EQ"; $secret_key1 = "SinigangNaManokMayHalongBaboy"; // Create the initialization vector for added security. $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_CBC), MCRYPT_RAND); $iv1 = "SinigangNaManok"; // Encrypt $string $encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_192, $secret_key1, $string, MCRYPT_MODE_CBC, $iv); // Decrypt $string $decrypted_string = mcrypt_decrypt(MCRYPT_RIJNDAEL_192, $secret_key1, $encrypted_string1, MCRYPT_MODE_CBC, $iv1); echo "Original string : " . $string . "<br />\n"; echo "Encrypted string : " . $encrypted_string . "<br />\n"; echo "Decrypted string1 : " . $decrypted_string . ""; ?>

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.0170.00316.50
8.3.50.0080.00818.29
8.3.40.0140.00718.88
8.3.30.0100.00318.66
8.3.20.0080.00019.34
8.3.10.0070.00021.79
8.3.00.0060.00319.02
8.2.180.0080.00818.68
8.2.170.0040.01122.96
8.2.160.0100.00322.13
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0050.00317.91
8.2.120.0040.00426.35
8.2.110.0090.00319.30
8.2.100.0080.00417.91
8.2.90.0000.00919.25
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0040.00417.90
8.2.50.0000.00818.09
8.2.40.0040.00420.59
8.2.30.0000.00719.31
8.2.20.0020.00517.57
8.2.10.0040.00418.10
8.2.00.0040.00417.97
8.1.270.0070.00023.96
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0070.00322.36
8.1.230.0040.00719.02
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0000.00818.61
8.1.160.0070.00020.59
8.1.150.0080.00018.95
8.1.140.0000.00719.57
8.1.130.0000.00820.03
8.1.120.0000.00717.43
8.1.110.0100.00017.30
8.1.100.0000.00717.38
8.1.90.0030.00617.34
8.1.80.0020.00517.33
8.1.70.0000.00717.43
8.1.60.0040.00417.49
8.1.50.0030.00517.41
8.1.40.0050.00317.54
8.1.30.0080.00017.61
8.1.20.0000.00817.66
8.1.10.0080.00017.55
8.1.00.0110.00017.51
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0050.00318.32
8.0.270.0030.00317.09
8.0.260.0030.00318.41
8.0.250.0000.00716.99
8.0.240.0000.00816.94
8.0.230.0030.00316.97
8.0.220.0040.00416.84
8.0.210.0000.00716.98
8.0.200.0030.00316.98
8.0.190.0000.00816.96
8.0.180.0040.00416.96
8.0.170.0050.00316.97
8.0.160.0080.00016.84
8.0.150.0030.00316.73
8.0.140.0000.00816.89
8.0.130.0000.00613.29
8.0.120.0060.00316.88
8.0.110.0030.00516.91
8.0.100.0000.00716.87
8.0.90.0000.00716.79
8.0.80.0060.00916.79
8.0.70.0000.01016.78
8.0.60.0000.00716.93
8.0.50.0000.00716.94
8.0.30.0140.00217.03
8.0.20.0070.01517.40
8.0.10.0070.00017.14
8.0.00.0070.01016.79
7.4.330.0000.00415.08
7.4.320.0040.00416.55
7.4.300.0000.00716.66
7.4.290.0040.00416.62
7.4.280.0050.00516.43
7.4.270.0030.00316.67
7.4.260.0070.00016.45
7.4.250.0070.00016.46
7.4.240.0080.00016.48
7.4.230.0000.00716.44
7.4.220.0040.01516.54
7.4.210.0120.00316.66
7.4.200.0030.00516.61
7.4.160.0000.01516.67
7.4.150.0030.02117.40
7.4.140.0160.00617.86
7.4.130.0110.00816.48
7.4.120.0120.00616.39
7.4.110.0160.00016.40
7.4.100.0170.00316.49
7.4.90.0030.01416.63
7.4.80.0100.00719.39
7.4.70.0170.00016.64
7.4.60.0130.00316.53
7.4.50.0080.00516.38
7.4.40.0070.01016.47
7.4.30.0090.00816.64
7.4.00.0000.01515.13
7.3.330.0050.00013.03
7.3.320.0030.00213.12
7.3.310.0040.00416.37
7.3.300.0030.00316.23
7.3.290.0110.00616.27
7.3.280.0070.01016.28
7.3.270.0040.01217.40
7.3.260.0140.00616.40
7.3.250.0120.01016.43
7.3.240.0070.01316.36
7.3.230.0150.00816.39
7.3.210.0100.00716.39
7.3.200.0150.00619.39
7.3.190.0120.01216.23
7.3.180.0060.01116.26
7.3.170.0110.00716.18
7.3.160.0110.00516.50
7.3.120.0110.00415.00
7.3.110.0030.01014.98
7.3.100.0080.00314.76
7.3.90.0070.00715.11
7.3.80.0030.00914.45
7.3.70.0100.00014.83
7.3.60.0000.01614.66
7.3.50.0040.01114.35
7.3.40.0070.00414.73
7.3.30.0120.00314.61
7.3.20.0090.00316.61
7.3.10.0040.01416.64
7.3.00.0060.01016.74
7.2.330.0040.01416.31
7.2.320.0060.01216.37
7.2.310.0160.00616.52
7.2.300.0140.00416.69
7.2.290.0040.01416.47
7.2.240.0100.00314.50
7.2.230.0070.01015.06
7.2.220.0030.01014.87
7.2.210.0100.00715.08
7.2.200.0120.00614.96
7.2.190.0060.01014.95
7.2.180.0040.01114.90
7.2.170.0060.00914.79
7.2.160.0060.00914.79
7.2.150.0040.01216.72
7.2.140.0120.00316.63
7.2.130.0040.01416.56
7.2.120.0100.00716.56
7.2.110.0110.00716.54
7.2.100.0000.01116.69
7.2.90.0110.00616.67
7.2.80.0070.01016.90
7.2.70.0080.00416.84
7.2.60.0050.01016.84
7.2.50.0070.01016.66
7.2.40.0080.00416.78
7.2.30.0100.00716.90
7.2.20.0070.01016.82
7.2.10.0070.01016.84
7.2.00.0050.01017.95
7.1.330.0030.01015.71
7.1.320.0030.00715.62
7.1.310.0070.00715.58
7.1.300.0020.01415.73
7.1.290.0070.00715.43
7.1.280.0000.01315.67
7.1.270.0080.00815.59
7.1.260.0030.00715.53
7.1.250.0040.00815.41
7.1.200.0040.00715.58
7.1.100.0000.01117.93
7.1.70.0000.00816.65
7.1.60.0070.01819.85
7.1.50.0170.00716.90
7.1.00.0000.08022.54
7.0.200.0300.00714.58
7.0.60.0170.05720.03
7.0.50.0100.06020.42
7.0.40.0200.05020.51
7.0.30.0100.06020.54
7.0.20.0570.05720.51
7.0.10.0530.06020.50
7.0.00.0570.05720.53
5.6.280.0100.06320.91
5.6.210.0100.06320.80
5.6.200.0230.05321.13
5.6.190.0230.05721.18
5.6.180.0230.04721.13
5.6.170.0100.06021.13
5.6.160.0130.05321.19
5.6.150.0130.05321.27
5.6.140.0030.06321.13
5.6.130.0400.06021.11
5.6.120.0130.06021.25
5.6.110.0270.06021.20
5.6.100.0230.05021.13
5.6.90.0200.06021.00
5.6.80.0230.05720.52
5.6.70.0230.04720.47
5.6.60.0170.05320.50
5.6.50.0200.05320.51
5.6.40.0230.06720.54
5.6.30.0200.05320.50
5.6.20.0170.05320.58
5.6.10.0130.05320.63
5.6.00.0070.06020.37
5.5.350.0170.05720.52
5.5.340.0300.05020.95
5.5.330.0130.05721.11
5.5.320.0000.07720.94
5.5.310.0300.06320.89
5.5.300.0100.05720.85
5.5.290.0470.05721.08
5.5.280.0070.06720.89
5.5.270.0170.05721.07
5.5.260.0130.06320.93
5.5.250.0170.05720.66
5.5.240.0270.05020.32
5.5.230.0170.05720.21
5.5.220.0130.06020.27
5.5.210.0130.05320.20
5.5.200.0130.05720.43
5.5.190.0130.06020.46
5.5.180.0100.05720.25
5.5.160.0100.05720.45
5.5.150.0130.05020.37
5.5.140.0170.05320.36
5.5.130.0500.05020.32
5.5.120.0430.06320.45
5.5.110.0170.05020.13
5.5.100.0030.06320.04
5.5.90.0200.04720.21
5.5.80.0470.04320.14
5.5.70.0370.05320.24
5.5.60.0230.04320.14
5.5.50.0170.05020.25
5.5.40.0230.04020.02
5.5.30.0470.05020.01
5.5.20.0370.06320.14
5.5.10.0300.06020.20
5.5.00.0400.06020.18

preferences:
57.69 ms | 400 KiB | 5 Q