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"; // Create the initialization vector for added security. $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND); // Encrypt $string $encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $secret_key, $string, MCRYPT_MODE_CBC, $iv); // Decrypt $string $decrypted_string = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $secret_key, $encrypted_string, MCRYPT_MODE_CBC, $iv); echo "Original string : " . $string . "<br />\n"; echo "Encrypted string : " . $encrypted_string . "<br />\n"; echo "Decrypted string : " . $decrypted_string . "<br />\n"; ?>

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.0160.00318.41
8.3.50.0150.00521.14
8.3.40.0140.00718.84
8.3.30.0140.00020.21
8.3.20.0040.00420.16
8.3.10.0050.00321.13
8.3.00.0080.00022.43
8.2.180.0070.01417.00
8.2.170.0120.00622.96
8.2.160.0070.00722.13
8.2.150.0130.00724.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.79
8.2.110.0030.00721.05
8.2.100.0060.00617.78
8.2.90.0100.00319.18
8.2.80.0080.00018.05
8.2.70.0000.00917.50
8.2.60.0060.00317.91
8.2.50.0000.01118.10
8.2.40.0000.00920.59
8.2.30.0000.00819.54
8.2.20.0040.00417.57
8.2.10.0040.00417.75
8.2.00.0070.00017.67
8.1.280.0070.01125.92
8.1.270.0000.00723.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00722.59
8.1.230.0110.00419.10
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0090.00017.35
8.1.190.0080.00017.10
8.1.180.0000.00718.10
8.1.170.0090.00018.39
8.1.160.0080.00022.06
8.1.150.0060.00318.52
8.1.140.0040.00417.30
8.1.130.0070.00317.88
8.1.120.0000.00717.42
8.1.110.0040.00417.47
8.1.100.0040.00417.29
8.1.90.0040.00417.45
8.1.80.0000.00817.37
8.1.70.0030.00317.29
8.1.60.0000.00917.41
8.1.50.0040.00417.53
8.1.40.0040.00417.54
8.1.30.0040.00417.57
8.1.20.0000.00817.60
8.1.10.0040.00417.55
8.1.00.0020.00517.54
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0000.00718.38
8.0.270.0050.00217.12
8.0.260.0070.00016.73
8.0.250.0000.00716.92
8.0.240.0040.00416.97
8.0.230.0030.00316.95
8.0.220.0030.00316.86
8.0.210.0000.00716.89
8.0.200.0000.00616.84
8.0.190.0070.00017.00
8.0.180.0040.00416.98
8.0.170.0000.00916.90
8.0.160.0070.00016.91
8.0.150.0050.00316.84
8.0.140.0000.00716.91
8.0.130.0030.00313.29
8.0.120.0040.00416.86
8.0.110.0040.00416.84
8.0.100.0000.00716.93
8.0.90.0050.00216.71
8.0.80.0120.00816.83
8.0.70.0050.00316.94
8.0.60.0000.00716.97
8.0.50.0070.00016.69
8.0.30.0160.00317.04
8.0.20.0090.01117.40
8.0.10.0040.00416.92
8.0.00.0070.01216.59
7.4.330.0050.00016.84
7.4.320.0000.00616.53
7.4.300.0000.00716.50
7.4.290.0030.00316.47
7.4.280.0070.00016.55
7.4.270.0000.00716.56
7.4.260.0020.00213.30
7.4.250.0030.00516.52
7.4.240.0050.00216.64
7.4.230.0070.00016.56
7.4.220.0100.01016.61
7.4.210.0080.00716.56
7.4.200.0030.00316.42
7.4.190.0040.00416.71
7.4.160.0060.00916.37
7.4.150.0100.00717.40
7.4.140.0050.01217.86
7.4.130.0110.01016.44
7.4.120.0090.00716.57
7.4.110.0070.01016.66
7.4.100.0000.01716.56
7.4.90.0070.01016.41
7.4.80.0110.01119.39
7.4.70.0030.01216.66
7.4.60.0110.00616.46
7.4.50.0030.00516.49
7.4.40.0040.01122.77
7.4.30.0120.00316.49
7.4.00.0110.00014.66
7.3.330.0050.00013.02
7.3.320.0000.00513.13
7.3.310.0030.00316.22
7.3.300.0030.00316.31
7.3.290.0000.00616.29
7.3.280.0080.01116.27
7.3.270.0140.00317.40
7.3.260.0120.00818.24
7.3.250.0110.00616.45
7.3.240.0100.01016.57
7.3.230.0070.01116.49
7.3.210.0090.00916.38
7.3.200.0130.00619.39
7.3.190.0110.00616.44
7.3.180.0050.01116.18
7.3.170.0050.01116.50
7.3.160.0130.00716.25
7.3.120.0100.00714.75
7.3.110.0120.00314.68
7.3.100.0100.00315.04
7.3.90.0040.01114.61
7.3.80.0090.00614.74
7.3.70.0090.00314.50
7.3.60.0000.01714.80
7.3.50.0100.00314.58
7.3.40.0040.01214.63
7.3.30.0040.00714.63
7.3.20.0030.00916.42
7.3.10.0060.00916.60
7.3.00.0060.00916.63
7.2.330.0000.01716.36
7.2.320.0110.00916.23
7.2.310.0060.01216.57
7.2.300.0090.00916.19
7.2.290.0070.01016.58
7.2.240.0030.00915.09
7.2.230.0060.00614.98
7.2.220.0040.01115.06
7.2.210.0130.00315.04
7.2.200.0090.00614.99
7.2.190.0070.01114.94
7.2.180.0030.01015.04
7.2.170.0040.01414.98
7.2.160.0090.00614.77
7.2.150.0070.01016.79
7.2.140.0070.01016.77
7.2.130.0070.01016.75
7.2.120.0080.00816.84
7.2.110.0130.00316.80
7.2.100.0000.01116.52
7.2.90.0070.01016.80
7.2.80.0050.00816.76
7.2.70.0070.00416.61
7.2.60.0090.00516.72
7.2.50.0040.01216.65
7.2.40.0000.01116.48
7.2.30.0100.00616.78
7.2.20.0060.01216.72
7.2.10.0060.00616.94
7.2.00.0040.01318.07
7.1.330.0070.00815.38
7.1.320.0040.01215.53
7.1.310.0130.00315.70
7.1.300.0000.01015.55
7.1.290.0030.00615.45
7.1.280.0070.01015.68
7.1.270.0040.00715.40
7.1.260.0110.00315.68
7.1.250.0070.00315.46
7.1.200.0000.01315.41
7.1.70.0000.01817.07
7.1.60.0070.00717.23
7.1.50.0090.00616.63
7.1.40.0060.00616.69
7.1.30.0030.01416.55
7.1.20.0090.00916.60
7.1.10.0060.01016.52
7.1.00.0000.01116.59
7.0.200.0110.00016.78
7.0.190.0140.00016.64
7.0.180.0080.00816.16
7.0.170.0000.01116.14
7.0.160.0130.00316.27
7.0.150.0070.01016.33
7.0.140.0000.00816.30
7.0.130.0090.00016.55
7.0.120.0030.00616.56
7.0.110.0000.01416.34
7.0.100.0030.00716.42
7.0.90.0000.00916.29
7.0.80.0050.00216.21
7.0.70.0100.00316.26
7.0.60.0040.01216.11
7.0.50.0040.00416.41
7.0.40.0000.00715.52
7.0.30.0040.00415.52
7.0.20.0000.00715.52
7.0.10.0030.00615.52
7.0.00.0070.00015.52
5.6.300.0100.04420.57
5.6.290.0000.04720.82
5.6.280.0070.08820.81
5.6.270.0000.04921.03
5.6.260.0030.04120.84
5.6.250.0030.06521.02
5.6.240.0070.04321.00
5.6.230.0000.05020.99
5.6.220.0070.04020.92
5.6.210.0070.05421.00
5.6.200.0030.04020.82
5.6.190.0000.04520.82
5.6.180.0070.04421.00
5.6.170.0100.04021.00
5.6.160.0000.04620.81
5.6.150.0100.04920.77
5.6.140.0070.07920.90
5.6.130.0030.08020.92
5.6.120.0030.08720.89
5.6.110.0000.05020.94
5.6.100.0100.05320.75
5.6.90.0000.04720.95
5.6.80.0130.03820.35
5.6.70.0030.04320.35
5.6.60.0100.07120.36
5.6.50.0030.03820.10
5.6.40.0030.04120.34
5.6.30.0030.04120.18
5.6.20.0070.04120.33
5.6.10.0070.03420.26
5.6.00.0030.04120.14
5.5.380.0000.04417.48
5.5.370.0030.04517.56
5.5.360.0070.04017.45
5.5.350.0060.04217.50
5.5.340.0030.04217.98
5.5.330.0160.03618.08
5.5.320.0190.04917.98
5.5.310.0060.04618.07
5.5.300.0000.05317.96
5.5.290.0100.05717.82
5.5.280.0070.04417.96
5.5.270.0070.03917.97
5.5.260.0030.04318.02
5.5.250.0000.07117.93
5.5.240.0000.04217.47
5.5.230.0030.04217.46
5.5.220.0070.03917.16
5.5.210.0090.03317.35
5.5.200.0090.03417.27
5.5.190.0000.05417.34
5.5.180.0040.04217.46
5.5.160.0060.06017.24
5.5.150.0040.05317.41
5.5.140.0000.04517.34
5.5.130.0130.03717.43
5.5.120.0060.04017.32
5.5.110.0220.04117.25
5.5.100.0030.03917.15
5.5.90.0090.03417.30
5.5.80.0000.04617.32
5.5.70.0030.03817.31
5.5.60.0000.07717.35
5.5.50.0070.06117.20
5.5.40.0000.04117.16
5.5.30.0030.06417.15
5.5.20.0070.07517.21
5.5.10.0030.04117.05
5.5.00.0060.08417.27
5.4.450.0060.07019.21
5.4.440.0030.06019.27
5.4.430.0030.08619.20
5.4.420.0000.05919.41
5.4.410.0000.07219.18
5.4.400.0040.03618.88
5.4.390.0100.03318.99
5.4.380.0030.03718.98
5.4.370.0030.03818.88
5.4.360.0030.04219.11
5.4.350.0030.06019.22
5.4.340.0030.03818.96
5.4.320.0030.06518.90
5.4.310.0030.03818.98
5.4.300.0070.03419.06
5.4.290.0030.04418.98
5.4.280.0100.07618.96
5.4.270.0030.03819.21
5.4.260.0070.03719.06
5.4.250.0070.03819.10
5.4.240.0000.05619.21
5.4.230.0100.06119.05
5.4.220.0060.03619.05
5.4.210.0000.07518.89
5.4.200.0030.03718.97
5.4.190.0030.04419.11
5.4.180.0130.05819.16
5.4.170.0030.04019.08
5.4.160.0030.04119.10
5.4.150.0030.04219.20
5.4.140.0100.04216.56
5.4.130.0060.03816.50
5.4.120.0000.03816.55
5.4.110.0030.04516.40
5.4.100.0030.03816.61
5.4.90.0060.03516.66
5.4.80.0060.03416.74
5.4.70.0060.03716.62
5.4.60.0000.04216.70
5.4.50.0000.03916.54
5.4.40.0030.03616.51
5.4.30.0070.03016.67
5.4.20.0030.04116.63
5.4.10.0040.03916.61
5.4.00.0030.03715.96
5.3.290.0030.07715.52
5.3.280.0040.03515.52
5.3.270.0070.03615.52
5.3.260.0030.04315.52
5.3.250.0000.04215.52
5.3.240.0040.03915.52
5.3.230.0000.04115.52
5.3.220.0000.04315.52
5.3.210.0000.04315.52
5.3.200.0070.03315.52
5.3.190.0060.04215.52
5.3.180.0030.04615.52
5.3.170.0060.03315.52
5.3.160.0030.03915.52
5.3.150.0000.04215.52
5.3.140.0000.04015.52
5.3.130.0030.04015.52
5.3.120.0030.08915.52
5.3.110.0030.04315.52
5.3.100.0000.04215.52
5.3.90.0000.03915.52
5.3.80.0030.04115.52
5.3.70.0030.03515.52
5.3.60.0030.03915.52
5.3.50.0000.04015.52
5.3.40.0030.03415.52
5.3.30.0030.03415.52
5.3.20.0000.04015.52
5.3.10.0000.03515.52
5.3.00.0000.03615.52
5.2.170.0000.03415.52
5.2.160.0030.03115.52
5.2.150.0060.02915.52
5.2.140.0030.02715.52
5.2.130.0030.02915.52
5.2.120.0000.03115.52
5.2.110.0030.02815.52
5.2.100.0000.03615.52
5.2.90.0030.03415.52
5.2.80.0030.02715.52
5.2.70.0030.03015.52
5.2.60.0000.03015.52
5.2.50.0030.03115.52
5.2.40.0000.03115.52
5.2.30.0000.04915.52
5.2.20.0030.03015.52
5.2.10.0030.04015.52
5.2.00.0000.03115.52
5.1.60.0040.02815.52
5.1.50.0000.03315.52
5.1.40.0040.02515.52
5.1.30.0060.02615.52
5.1.20.0070.02315.52
5.1.10.0260.01615.52
5.1.00.0000.03015.52
5.0.50.0000.02315.52
5.0.40.0070.02415.52
5.0.30.0070.03015.52
5.0.20.0130.01015.52
5.0.10.0000.02515.52
5.0.00.0000.03415.52
4.4.90.0000.01715.52
4.4.80.0030.01915.52
4.4.70.0000.01715.52
4.4.60.0030.01315.52
4.4.50.0000.01715.52
4.4.40.0000.02515.52
4.4.30.0120.00915.52
4.4.20.0000.01815.52
4.4.10.0000.01715.52
4.4.00.0070.02015.52
4.3.110.0000.01715.52
4.3.100.0000.01615.52
4.3.90.0070.01415.52
4.3.80.0000.02815.52
4.3.70.0000.02015.52
4.3.60.0000.02015.52
4.3.50.0030.01615.52
4.3.40.0000.02415.52
4.3.30.0000.02315.52
4.3.20.0000.01915.52
4.3.10.0070.01415.52
4.3.00.0000.01815.52

preferences:
52.13 ms | 401 KiB | 5 Q