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.0070.01116.75
8.3.50.0070.00718.05
8.3.40.0150.00618.74
8.3.30.0110.00818.65
8.3.20.0000.00819.16
8.3.10.0070.00021.87
8.3.00.0060.00319.23
8.2.180.0040.01118.41
8.2.170.0120.00322.96
8.2.160.0070.01022.12
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00017.80
8.2.120.0000.00726.35
8.2.110.0070.00420.80
8.2.100.0060.00617.91
8.2.90.0000.00819.28
8.2.80.0040.00417.97
8.2.70.0090.00017.25
8.2.60.0080.00017.80
8.2.50.0060.00318.09
8.2.40.0060.00322.33
8.2.30.0040.00419.50
8.2.20.0050.00317.70
8.2.10.0070.00018.14
8.2.00.0040.00418.07
8.1.280.0110.00725.92
8.1.270.0040.00423.69
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0090.00022.42
8.1.230.0070.00417.70
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0030.00518.52
8.1.160.0000.00720.64
8.1.150.0040.00418.90
8.1.140.0000.00719.48
8.1.130.0070.00017.67
8.1.120.0000.00717.38
8.1.110.0000.01017.30
8.1.100.0080.00017.30
8.1.90.0040.00417.43
8.1.80.0030.00517.43
8.1.70.0070.00017.43
8.1.60.0000.00817.49
8.1.50.0060.00317.46
8.1.40.0000.00817.57
8.1.30.0080.00017.54
8.1.20.0040.00417.69
8.1.10.0000.00717.49
8.1.00.0110.00017.52
8.0.300.0040.00418.77
8.0.290.0020.00516.63
8.0.280.0000.00818.28
8.0.270.0000.00917.21
8.0.260.0030.00317.12
8.0.250.0030.00316.93
8.0.240.0060.00316.84
8.0.230.0000.00716.95
8.0.220.0030.00516.82
8.0.210.0080.00016.82
8.0.200.0030.00316.96
8.0.190.0040.00416.84
8.0.180.0000.00716.87
8.0.170.0000.00716.81
8.0.160.0070.00416.93
8.0.150.0040.00416.92
8.0.140.0000.00816.85
8.0.130.0030.00313.38
8.0.120.0000.00916.76
8.0.110.0040.00416.74
8.0.100.0000.00716.85
8.0.90.0030.00316.87
8.0.80.0120.00416.87
8.0.70.0080.00316.88
8.0.60.0040.00416.98
8.0.50.0040.00416.93
8.0.30.0020.01516.94
8.0.20.0050.01517.40
8.0.10.0070.00016.92
8.0.00.0030.01516.68
7.4.330.0000.00515.08
7.4.320.0000.00616.55
7.4.300.0030.00316.54
7.4.290.0040.00416.57
7.4.280.0040.00416.50
7.4.270.0000.00716.54
7.4.260.0000.00816.64
7.4.250.0000.00716.41
7.4.240.0000.00716.65
7.4.230.0030.00316.51
7.4.220.0110.00716.51
7.4.210.0040.01116.53
7.4.200.0040.00416.69
7.4.160.0090.00616.77
7.4.150.0220.00317.40
7.4.140.0060.01117.86
7.4.130.0090.00916.40
7.4.120.0100.00716.57
7.4.110.0100.00716.68
7.4.100.0030.01316.30
7.4.90.0100.00716.47
7.4.80.0080.00819.39
7.4.70.0090.00616.62
7.4.60.0110.00616.48
7.4.50.0030.01416.73
7.4.40.0080.01416.36
7.4.30.0120.00916.38
7.4.10.0050.01014.71
7.4.00.0030.01414.94
7.3.330.0000.00613.14
7.3.320.0050.00013.11
7.3.310.0040.00416.14
7.3.300.0030.00316.29
7.3.290.0120.00716.26
7.3.280.0090.01016.26
7.3.270.0070.01717.40
7.3.260.0050.01216.38
7.3.250.0080.01116.43
7.3.240.0070.01316.28
7.3.230.0120.00916.39
7.3.210.0130.00316.24
7.3.200.0150.00719.39
7.3.190.0180.00316.28
7.3.180.0150.00916.35
7.3.170.0100.01016.28
7.3.160.0090.00816.35
7.3.130.0120.00314.95
7.3.120.0070.00714.80
7.3.110.0090.00914.55
7.3.100.0000.01214.86
7.3.90.0050.00514.63
7.3.80.0150.00014.96
7.3.70.0060.00614.87
7.3.60.0060.00914.53
7.3.50.0000.01614.96
7.3.40.0030.00914.70
7.3.30.0000.00814.79
7.3.20.0100.00316.46
7.3.10.0080.00616.47
7.3.00.0040.01116.64
7.2.330.0100.01416.45
7.2.320.0130.00616.47
7.2.310.0070.01016.26
7.2.300.0100.01316.23
7.2.290.0120.00616.63
7.2.260.0100.00715.14
7.2.250.0060.01214.85
7.2.240.0100.00614.90
7.2.230.0030.01314.81
7.2.220.0000.01414.77
7.2.210.0060.00614.66
7.2.200.0070.00715.05
7.2.190.0000.01614.84
7.2.180.0060.00615.04
7.2.170.0070.00714.55
7.2.160.0040.01114.87
7.2.150.0060.00316.56
7.2.140.0030.00916.86
7.2.130.0020.01316.81
7.2.120.0070.01016.88
7.2.110.0070.00916.71
7.2.100.0050.01216.79
7.2.90.0100.00316.73
7.2.80.0100.00516.85
7.2.70.0030.00816.68
7.2.60.0050.00716.72
7.2.50.0060.00816.73
7.2.40.0080.00616.74
7.2.30.0090.00516.71
7.2.20.0020.01116.80
7.2.10.0030.01016.81
7.2.00.0090.00517.55
7.1.330.0030.01015.68
7.1.320.0070.00715.67
7.1.310.0070.00315.57
7.1.300.0040.01415.45
7.1.290.0060.00315.40
7.1.280.0000.01315.74
7.1.270.0040.01115.63
7.1.260.0080.00615.69
7.1.250.0040.00915.65
7.1.240.0030.01415.65
7.1.230.0080.00415.73
7.1.220.0070.00715.66
7.1.210.0030.00915.78
7.1.200.0090.00615.56
7.1.190.0040.01115.46
7.1.180.0000.00915.63
7.1.170.0110.00315.63
7.1.160.0030.00715.60
7.1.150.0030.01015.68
7.1.140.0070.00715.67
7.1.130.0100.00715.75
7.1.120.0000.01315.77
7.1.110.0080.00315.43
7.1.100.0020.01116.71
7.1.90.0000.01015.57
7.1.80.0030.00615.67
7.1.70.0000.01116.18
7.1.60.0050.01117.57
7.1.50.0110.00716.29
7.1.40.0040.00715.68
7.1.30.0040.01115.70
7.1.20.0060.00915.62
7.1.10.0000.01415.41
7.1.00.0050.03719.10
7.0.330.0030.01015.05
7.0.320.0040.00715.13
7.0.310.0110.00315.32
7.0.300.0030.00715.30
7.0.290.0030.00515.28
7.0.280.0040.01115.43
7.0.270.0090.00915.30
7.0.260.0030.01015.15
7.0.250.0000.00915.40
7.0.240.0040.01115.07
7.0.230.0140.00015.42
7.0.220.0000.01015.43
7.0.210.0040.01015.45
7.0.200.0150.00514.83
7.0.190.0000.00915.38
7.0.180.0050.00315.45
7.0.170.0040.00415.49
7.0.160.0050.00415.39
7.0.150.0040.01115.49
7.0.140.0060.00315.31
7.0.130.0070.00715.44
7.0.120.0030.00915.23
7.0.110.0050.00515.28
7.0.100.0000.01215.43
7.0.90.0070.00715.31
7.0.80.0000.01115.18
7.0.70.0030.00915.16
7.0.60.0140.02917.52
7.0.50.0050.03817.98
7.0.40.0120.03216.82
7.0.30.0120.03516.81
7.0.20.0140.03016.85
7.0.10.0080.03716.89
7.0.00.0100.03716.90
5.6.400.0090.00614.09
5.6.390.0050.00513.87
5.6.380.0100.00314.04
5.6.370.0000.01214.20
5.6.360.0060.00914.39
5.6.350.0000.01514.19
5.6.340.0100.00014.41
5.6.330.0000.01114.29
5.6.320.0030.00814.24
5.6.310.0060.00914.48
5.6.300.0050.00514.49
5.6.290.0040.00414.33
5.6.280.0080.04017.81
5.6.270.0100.00714.29
5.6.260.0080.00814.36
5.6.250.0070.00714.43
5.6.240.0000.01714.31
5.6.230.0070.00714.48
5.6.220.0060.00613.90
5.6.210.0050.03417.36
5.6.200.0120.03817.67
5.6.190.0100.03517.60
5.6.180.0150.02917.66
5.6.170.0190.03417.62
5.6.160.0090.03417.64
5.6.150.0150.03017.80
5.6.140.0090.02917.54
5.6.130.0240.03217.63
5.6.120.0090.03417.59
5.6.110.0100.03517.66
5.6.100.0170.03617.73
5.6.90.0250.02817.65
5.6.80.0340.02517.34
5.6.70.0230.03017.37
5.6.60.0250.02617.21
5.6.50.0260.02817.30
5.6.40.0250.03017.24
5.6.30.0180.03517.45
5.6.20.0250.02917.27
5.6.10.0180.03317.21
5.6.00.0210.03017.31
5.5.380.0040.01114.13
5.5.370.0000.01513.79
5.5.360.0060.01214.16
5.5.350.0120.03117.30
5.5.340.0040.03517.47
5.5.330.0050.03717.66
5.5.320.0080.03417.58
5.5.310.0170.02817.50
5.5.300.0090.03117.69
5.5.290.0080.03717.43
5.5.280.0100.03017.40
5.5.270.0280.02817.41
5.5.260.0210.03317.43
5.5.250.0200.03417.33
5.5.240.0250.03617.08
5.5.230.0230.03317.18
5.5.220.0240.02717.10
5.5.210.0270.03017.33
5.5.200.0180.03517.16
5.5.190.0200.03517.05
5.5.180.0230.03517.01
5.5.170.0060.00613.77
5.5.160.0200.03317.09
5.5.150.0260.02717.07
5.5.140.0210.03017.15
5.5.130.0230.03017.05
5.5.120.0270.02517.34
5.5.110.0250.03316.99
5.5.100.0230.03617.23
5.5.90.0230.03317.05
5.5.80.0210.03217.10
5.5.70.0180.03516.94
5.5.60.0220.03017.14
5.5.50.0250.02917.07
5.5.40.0170.03316.98
5.5.30.0200.02917.21
5.5.20.0130.03817.13
5.5.10.0180.03517.00
5.5.00.0230.02817.17

preferences:
62.97 ms | 400 KiB | 5 Q