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 ="brxeIzp7p60UsC6SSPXB1g=="; $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.0110.01116.50
8.3.50.0100.00921.93
8.3.40.0070.01018.88
8.3.30.0110.00418.70
8.3.20.0040.00419.34
8.3.10.0030.00521.85
8.3.00.0100.00319.11
8.2.180.0060.01316.63
8.2.170.0110.00822.96
8.2.160.0120.00622.24
8.2.150.0060.00324.18
8.2.140.0070.00724.66
8.2.130.0080.00017.80
8.2.120.0000.00826.35
8.2.110.0060.00322.04
8.2.100.0100.00319.57
8.2.90.0000.00919.27
8.2.80.0040.00419.65
8.2.70.0000.00817.63
8.2.60.0050.00317.80
8.2.50.0030.00518.07
8.2.40.0080.00018.09
8.2.30.0040.00418.05
8.2.20.0070.00017.80
8.2.10.0040.00418.14
8.2.00.0070.00018.12
8.1.280.0070.01425.92
8.1.270.0060.00323.87
8.1.260.0060.00328.09
8.1.250.0070.00028.09
8.1.240.0080.00023.73
8.1.230.0070.00318.97
8.1.220.0060.00317.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0040.00417.54
8.1.180.0030.00618.10
8.1.170.0090.00018.52
8.1.160.0000.00718.87
8.1.150.0050.00318.59
8.1.140.0050.00219.52
8.1.130.0000.00717.56
8.1.120.0000.00717.28
8.1.110.0030.00717.38
8.1.100.0050.00317.37
8.1.90.0050.00217.41
8.1.80.0040.00417.31
8.1.70.0030.00317.45
8.1.60.0040.00417.42
8.1.50.0040.00417.41
8.1.40.0040.00417.46
8.1.30.0060.00317.57
8.1.20.0080.00017.70
8.1.10.0080.00017.57
8.1.00.0050.00517.45
8.0.300.0000.00718.77
8.0.290.0050.00216.93
8.0.280.0030.00318.39
8.0.270.0070.00017.13
8.0.260.0000.00717.27
8.0.250.0060.00016.98
8.0.240.0090.00017.04
8.0.230.0000.00816.96
8.0.220.0040.00416.79
8.0.210.0070.00016.91
8.0.200.0070.00017.03
8.0.190.0040.00816.83
8.0.180.0090.00016.79
8.0.170.0040.00416.94
8.0.160.0000.00917.00
8.0.150.0030.00316.86
8.0.140.0040.00416.77
8.0.130.0050.00013.27
8.0.120.0030.00616.94
8.0.110.0080.00016.85
8.0.100.0000.00716.85
8.0.90.0070.00016.71
8.0.80.0080.00816.91
8.0.70.0040.00616.77
8.0.60.0040.00416.97
8.0.50.0070.00016.75
8.0.30.0130.01216.97
8.0.20.0090.01117.40
8.0.10.0040.00317.10
8.0.00.0090.00916.61
7.4.330.0020.00215.08
7.4.320.0000.00616.60
7.4.300.0030.00316.64
7.4.290.0040.00416.50
7.4.280.0080.00316.54
7.4.270.0000.00716.63
7.4.260.0070.00016.59
7.4.250.0030.00316.57
7.4.240.0000.00716.66
7.4.230.0040.00416.43
7.4.220.0030.01616.39
7.4.210.0060.00916.57
7.4.200.0030.00316.57
7.4.160.0140.00316.32
7.4.150.0190.00617.40
7.4.140.0090.01317.86
7.4.130.0110.00816.47
7.4.120.0120.00616.52
7.4.110.0070.01116.66
7.4.100.0080.00816.51
7.4.90.0150.00316.38
7.4.80.0090.00919.39
7.4.70.0100.00716.51
7.4.60.0060.01016.59
7.4.50.0060.00616.61
7.4.40.0130.00616.47
7.4.30.0120.00416.61
7.4.00.0050.01215.02
7.3.330.0060.00012.99
7.3.320.0030.00313.14
7.3.310.0070.00016.13
7.3.300.0070.00016.11
7.3.290.0100.00516.29
7.3.280.0090.00216.31
7.3.270.0090.00817.40
7.3.260.0110.01116.57
7.3.250.0090.00816.33
7.3.240.0090.00916.52
7.3.230.0070.01016.39
7.3.210.0030.01316.41
7.3.200.0040.01419.39
7.3.190.0110.01116.53
7.3.180.0060.00916.42
7.3.170.0060.01716.23
7.3.160.0090.00616.49
7.3.120.0030.01514.70
7.3.110.0060.01014.79
7.3.100.0050.01014.87
7.3.90.0080.00514.84
7.3.80.0100.00214.63
7.3.70.0070.00514.72
7.3.60.0070.00814.80
7.3.50.0070.00614.75
7.3.40.0050.00814.75
7.3.30.0070.00714.72
7.3.20.0090.00616.44
7.3.10.0050.00916.43
7.3.00.0040.00816.59
7.2.330.0060.01316.50
7.2.320.0080.00816.42
7.2.310.0070.01416.61
7.2.300.0120.00916.53
7.2.290.0070.01016.66
7.2.250.0010.01114.74
7.2.240.0070.01014.88
7.2.230.0130.00314.84
7.2.220.0060.00914.97
7.2.210.0060.00914.84
7.2.200.0070.00814.63
7.2.190.0080.00614.76
7.2.180.0100.00314.96
7.2.170.0060.01014.88
7.2.160.0080.00814.93
7.2.150.0140.00416.76
7.2.140.0000.01516.81
7.2.130.0070.01116.69
7.2.120.0060.00816.85
7.2.110.0030.01416.72
7.2.100.0000.01516.77
7.2.90.0030.00716.75
7.2.80.0130.00316.81
7.2.70.0000.01016.76
7.2.60.0080.00616.68
7.2.50.0030.00916.60
7.2.40.0100.00716.81
7.2.30.0070.00716.64
7.2.20.0080.00416.59
7.2.10.0070.00716.32
7.2.00.0050.01017.80
7.1.330.0070.00715.53
7.1.320.0090.00615.64
7.1.310.0040.00915.70
7.1.300.0060.00815.62
7.1.290.0020.00915.54
7.1.280.0020.01015.54
7.1.270.0040.00915.54
7.1.260.0100.00515.63
7.1.250.0030.01315.57
7.1.200.0060.00715.57
7.1.100.0070.00718.00
7.1.70.0570.00415.16
7.1.60.0090.01519.85
7.1.50.0030.02116.82
7.1.00.0030.07322.45
7.0.200.0230.00314.61
7.0.60.0100.06320.04
7.0.50.0200.05720.35
7.0.40.0130.05720.36
7.0.30.0130.06020.35
7.0.20.0200.05320.41
7.0.10.0170.06320.52
7.0.00.0170.05720.53
5.6.280.0030.07321.09
5.6.210.0100.06020.59
5.6.200.0100.06321.16
5.6.190.0170.05321.13
5.6.180.0230.04721.08
5.6.170.0200.05321.22
5.6.160.0170.06321.07
5.6.150.0200.05021.26
5.6.140.0130.05321.23
5.6.130.0400.06321.16
5.6.120.0170.05321.08
5.6.110.0300.05321.08
5.6.100.0400.06321.24
5.6.90.0430.06021.19
5.6.80.0470.05020.46
5.6.70.0470.05020.50
5.6.60.0470.05020.54
5.6.50.0500.04720.52
5.6.40.0400.05720.38
5.6.30.0430.05320.53
5.6.20.0100.05720.53
5.6.10.0230.04720.61
5.6.00.0270.04720.61
5.5.350.0170.05720.44
5.5.340.0170.05320.90
5.5.330.0230.04321.11
5.5.320.0100.05720.85
5.5.310.0130.05721.01
5.5.300.0200.04721.04
5.5.290.0270.06320.94
5.5.280.0000.06720.81
5.5.270.0500.05020.84
5.5.260.0570.05020.93
5.5.250.0400.06020.89
5.5.240.0400.06020.30
5.5.230.0430.05720.28
5.5.220.0470.05020.46
5.5.210.0570.04320.31
5.5.200.0330.06320.47
5.5.190.0070.06320.23
5.5.180.0070.06320.34
5.5.160.0130.05720.37
5.5.150.0170.05320.17
5.5.140.0170.05320.25
5.5.130.0170.05720.19
5.5.120.0230.04720.40
5.5.110.0070.06320.37
5.5.100.0230.05020.13
5.5.90.0200.04720.18
5.5.80.0230.04720.03
5.5.70.0200.06320.12
5.5.60.0200.05320.16
5.5.50.0200.05020.34
5.5.40.0170.05020.23
5.5.30.0170.05720.16
5.5.20.0230.05020.15
5.5.10.0230.05720.23
5.5.00.0170.05720.21

preferences:
33.98 ms | 401 KiB | 5 Q