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_192, MCRYPT_MODE_CBC), MCRYPT_RAND); // Encrypt $string $encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_192, $secret_key, $string, MCRYPT_MODE_CBC, $iv); // Decrypt $string $decrypted_string = mcrypt_decrypt(MCRYPT_RIJNDAEL_192, $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.5.00.0110.01020.18
8.4.150.0020.00014.05
8.4.140.0120.00917.65
8.4.130.0110.01017.81
8.4.120.0100.00223.97
8.4.110.0110.00919.07
8.4.100.0020.00718.75
8.4.90.0050.00320.41
8.4.80.0090.00318.70
8.4.70.0050.00318.19
8.4.60.0100.00818.86
8.4.50.0100.01018.75
8.4.40.0080.01219.74
8.4.30.0090.00617.98
8.4.20.0120.00817.87
8.4.10.0040.00717.67
8.3.280.0110.01018.35
8.3.270.0180.00316.66
8.3.260.0100.00916.56
8.3.250.0100.00818.65
8.3.240.0110.00717.13
8.3.230.0120.00716.52
8.3.220.0110.00718.77
8.3.210.0070.01316.66
8.3.200.0120.00716.61
8.3.190.0090.00917.35
8.3.180.0070.00417.11
8.3.170.0070.00018.71
8.3.160.0120.00616.70
8.3.150.0150.00416.61
8.3.140.0000.00717.24
8.3.130.0050.00318.38
8.3.120.0120.00620.59
8.3.110.0090.00020.94
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0110.00017.97
8.3.70.0210.00016.50
8.3.60.0070.01416.50
8.3.50.0140.00821.98
8.3.40.0110.00419.02
8.3.30.0070.00718.88
8.3.20.0000.00819.25
8.3.10.0060.00821.85
8.3.00.0150.00319.06
8.2.290.0170.00220.25
8.2.280.0110.00818.51
8.2.270.0120.00316.92
8.2.260.0040.01116.55
8.2.250.0040.00418.31
8.2.240.0030.00619.00
8.2.230.0100.00022.58
8.2.220.0050.00337.54
8.2.210.0040.01126.77
8.2.200.0040.00418.29
8.2.190.0130.00318.43
8.2.180.0120.00616.48
8.2.170.0100.01022.96
8.2.160.0100.01022.05
8.2.150.0040.01124.18
8.2.140.0070.00024.66
8.2.130.0050.00317.80
8.2.120.0070.00026.35
8.2.110.0060.00319.31
8.2.100.0070.00417.90
8.2.90.0050.00219.05
8.2.80.0090.00017.97
8.2.70.0040.00417.59
8.2.60.0000.00817.80
8.2.50.0040.00718.09
8.2.40.0040.00420.59
8.2.30.0040.00419.25
8.2.20.0070.00017.59
8.2.10.0000.00718.12
8.2.00.0040.00418.09
8.1.330.0130.00621.88
8.1.320.0110.00718.28
8.1.310.0000.00816.23
8.1.300.0040.01120.40
8.1.290.0060.00330.84
8.1.280.0030.01525.92
8.1.270.0050.00522.05
8.1.260.0000.01028.09
8.1.250.0100.00728.09
8.1.240.0060.00622.48
8.1.230.0040.00817.83
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0070.00317.22
8.1.190.0000.00817.25
8.1.180.0080.00018.10
8.1.170.0000.00818.52
8.1.160.0070.00020.77
8.1.150.0050.00219.01
8.1.140.0070.00019.52
8.1.130.0030.00317.55
8.1.120.0030.00317.39
8.1.110.0050.00617.38
8.1.100.0030.00517.41
8.1.90.0040.00417.43
8.1.80.0070.00017.41
8.1.70.0040.00417.41
8.1.60.0000.00817.43
8.1.50.0000.00817.43
8.1.40.0040.00417.52
8.1.30.0000.00817.61
8.1.20.0030.00617.59
8.1.10.0060.00317.61
8.1.00.0000.00817.52
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0070.00018.26
8.0.270.0030.00317.20
8.0.260.0000.00617.18
8.0.250.0030.00316.93
8.0.240.0040.00416.95
8.0.230.0020.00516.98
8.0.220.0000.00716.86
8.0.210.0040.00416.84
8.0.200.0030.00316.84
8.0.190.0000.00917.05
8.0.180.0030.00516.83
8.0.170.0000.00816.96
8.0.160.0060.00316.92
8.0.150.0030.00316.80
8.0.140.0070.00316.85
8.0.130.0030.00313.27
8.0.120.0030.00616.90
8.0.110.0040.00416.87
8.0.100.0070.00016.93
8.0.90.0070.00016.76
8.0.80.0030.01716.85
8.0.70.0070.00416.74
8.0.60.0070.00016.93
8.0.50.0000.00716.93
8.0.30.0110.01317.02
8.0.20.0100.01117.40
8.0.10.0050.00316.96
8.0.00.0040.01716.64
7.4.330.0020.00215.08
7.4.320.0000.00616.42
7.4.300.0000.00616.50
7.4.290.0030.00316.53
7.4.280.0000.00916.65
7.4.270.0000.00616.64
7.4.260.0030.00316.52
7.4.250.0070.00016.57
7.4.240.0000.00716.57
7.4.230.0000.00716.40
7.4.220.0080.01116.45
7.4.210.0090.00616.47
7.4.200.0070.00016.59
7.4.160.0060.00916.44
7.4.150.0100.01017.40
7.4.140.0100.01017.86
7.4.130.0120.00516.65
7.4.120.0090.00716.56
7.4.110.0090.00616.54
7.4.100.0140.00316.48
7.4.90.0120.00616.52
7.4.80.0100.00719.39
7.4.70.0130.00316.60
7.4.60.0100.00716.58
7.4.50.0000.01116.37
7.4.40.0110.00516.68
7.4.30.0060.00916.56
7.4.20.0110.00916.46
7.4.10.0120.00716.01
7.4.00.0120.00915.63
7.3.330.0050.00013.03
7.3.320.0030.00312.97
7.3.310.0000.00616.18
7.3.300.0070.00016.29
7.3.290.0090.00616.21
7.3.280.0100.00716.34
7.3.270.0100.00717.40
7.3.260.0030.01516.45
7.3.250.0110.00916.28
7.3.240.0130.00916.36
7.3.230.0090.00916.39
7.3.210.0030.01316.19
7.3.200.0040.01219.39
7.3.190.0060.01616.54
7.3.180.0060.01016.55
7.3.170.0090.00916.28
7.3.160.0100.00616.41
7.3.130.0100.01115.82
7.3.120.0090.01015.56
7.3.110.0080.01215.49
7.3.100.0090.00515.48
7.3.90.0080.00915.58
7.3.80.0080.00915.51
7.3.70.0080.00715.50
7.3.60.0070.00815.45
7.3.50.0070.01115.52
7.3.40.0070.00915.51
7.3.30.0060.01115.54
7.3.20.0070.01016.46
7.3.10.0110.00716.28
7.3.00.0090.00716.35
7.2.330.0150.00616.34
7.2.320.0120.00916.46
7.2.310.0100.00716.31
7.2.300.0130.00516.52
7.2.290.0080.00916.61
7.2.260.0080.01115.88
7.2.250.0100.01015.62
7.2.240.0080.01215.84
7.2.230.0090.00915.57
7.2.220.0080.01015.79
7.2.210.0080.00815.60
7.2.200.0090.00615.74
7.2.190.0100.00815.62
7.2.180.0060.01315.69
7.2.170.0040.01215.74
7.2.160.0070.00915.87
7.2.150.0100.00816.57
7.2.140.0100.00616.68
7.2.130.0110.00816.57
7.2.120.0080.01016.52
7.2.110.0120.00616.48
7.2.100.0150.00916.52
7.2.90.0110.00916.58
7.2.80.0100.00916.63
7.2.70.0090.00916.41
7.2.60.0110.00616.54
7.2.50.0110.00916.59
7.2.40.0070.01016.50
7.2.30.0100.00716.46
7.2.20.0090.01016.55
7.2.10.0100.00816.61
7.2.00.0080.01016.96
7.1.330.0070.01015.41
7.1.320.0110.00615.41
7.1.310.0090.00615.50
7.1.300.0080.00815.43
7.1.290.0120.00415.41
7.1.280.0080.00815.37
7.1.270.0080.00615.46
7.1.260.0080.01115.41
7.1.250.0090.00815.50
7.1.240.0060.01015.31
7.1.230.0100.00715.31
7.1.220.0180.00615.28
7.1.210.0080.01115.35
7.1.200.0120.00815.41
7.1.190.0060.00715.40
7.1.180.0100.00615.32
7.1.170.0080.00915.35
7.1.160.0100.00915.32
7.1.150.0080.01015.19
7.1.140.0100.00915.29
7.1.130.0090.01215.27
7.1.120.0060.01015.20
7.1.110.0100.00815.48
7.1.100.0090.00916.06
7.1.90.0100.00715.53
7.1.80.0100.00815.38
7.1.70.0120.00715.82
7.1.60.0070.01116.46
7.1.50.0090.00615.60
7.1.40.0100.00915.26
7.1.30.0080.00915.33
7.1.20.0110.00715.32
7.1.10.0090.00915.30
7.1.00.0070.02617.15
7.0.330.0100.00515.07
7.0.320.0070.01115.04
7.0.310.0090.01015.10
7.0.300.0060.01015.14
7.0.290.0050.01215.20
7.0.280.0060.01015.01
7.0.270.0070.01214.90
7.0.260.0120.00515.01
7.0.250.0110.00715.22
7.0.240.0150.00415.21
7.0.230.0060.01015.02
7.0.220.0070.01115.13
7.0.210.0140.00615.09
7.0.200.0080.00815.00
7.0.190.0110.00715.14
7.0.180.0080.00814.91
7.0.170.0070.00915.09
7.0.160.0090.00915.17
7.0.150.0080.00915.07
7.0.140.0120.00515.11
7.0.130.0110.00615.14
7.0.120.0140.00515.30
7.0.110.0090.00815.00
7.0.100.0060.01215.06
7.0.90.0050.01415.10
7.0.80.0070.01015.06
7.0.70.0140.00415.10
7.0.60.0220.02016.31
7.0.50.0230.02016.44
7.0.40.0260.01815.92
7.0.30.0250.02115.98
7.0.20.0210.02215.92
7.0.10.0250.02115.95
7.0.00.0220.01815.91
5.6.400.0110.00815.17
5.6.390.0100.00715.16
5.6.380.0060.00815.08
5.6.370.0130.01015.28
5.6.360.0100.01015.05
5.6.350.0120.00715.28
5.6.340.0090.00815.11
5.6.330.0090.01215.18
5.6.320.0120.00615.20
5.6.310.0100.00715.22
5.6.300.0100.00815.06
5.6.290.0050.01415.14
5.6.280.0080.02416.67
5.6.270.0100.00815.05
5.6.260.0060.01115.14
5.6.250.0060.01315.24
5.6.240.0100.00915.12
5.6.230.0070.01215.20
5.6.220.0090.01215.16
5.6.210.0120.02316.47
5.6.200.0190.02416.61
5.6.190.0210.02516.58
5.6.180.0100.02116.72
5.6.170.0190.02416.74
5.6.160.0200.01916.60
5.6.150.0220.02016.63
5.6.140.0110.02216.68
5.6.130.0230.02016.67
5.6.120.0060.02616.70
5.6.110.0120.02416.66
5.6.100.0170.02316.74
5.6.90.0230.02216.70
5.6.80.0190.02516.32
5.6.70.0150.02216.45
5.6.60.0180.02116.43
5.6.50.0190.02016.45
5.6.40.0130.02716.44
5.6.30.0200.01916.57
5.6.20.0240.01616.37
5.6.10.0160.02516.55
5.6.00.0150.02116.49
5.5.380.0070.01114.96
5.5.370.0100.01015.00
5.5.360.0050.01215.15
5.5.350.0190.02116.55
5.5.340.0190.02116.49
5.5.330.0190.02216.52
5.5.320.0080.02216.49
5.5.310.0180.02416.60
5.5.300.0120.01916.59
5.5.290.0140.02516.49
5.5.280.0090.02416.57
5.5.270.0210.02216.48
5.5.260.0200.02016.50
5.5.250.0220.02116.42
5.5.240.0170.02116.32
5.5.230.0190.02216.36
5.5.220.0180.02116.39
5.5.210.0200.02016.28
5.5.200.0220.01916.20
5.5.190.0200.02916.36
5.5.180.0190.02216.32
5.5.170.0100.00614.94
5.5.160.0190.02116.30
5.5.150.0190.01916.24
5.5.140.0150.02316.22
5.5.130.0190.01816.34
5.5.120.0170.02216.23
5.5.110.0210.02116.22
5.5.100.0180.02616.18
5.5.90.0180.01916.26
5.5.80.0170.02316.15
5.5.70.0170.02116.13
5.5.60.0200.01916.16
5.5.50.0220.01716.23
5.5.40.0180.02316.30
5.5.30.0210.02616.26
5.5.20.0190.02316.28
5.5.10.0190.02116.23
5.5.00.0170.02416.18
5.4.450.0110.00312.15
5.4.440.0080.00612.30
5.4.430.0120.00312.39
5.4.420.0060.00912.11
5.4.410.0000.01712.21
5.4.400.0000.01412.33
5.4.390.0090.00612.17
5.4.380.0130.00512.21
5.4.370.0090.00612.32
5.4.360.0090.00612.36
5.4.350.0100.00612.42
5.4.340.0100.00712.27
5.4.330.0080.00612.30
5.4.320.0030.01212.21
5.4.310.0080.00412.14
5.4.300.0110.00412.37
5.4.290.0090.00812.39
5.4.280.0040.00812.21
5.4.270.0040.00812.30
5.4.260.0080.00412.23
5.4.250.0140.00312.41
5.4.240.0060.00612.25
5.4.230.0100.00312.16
5.4.220.0000.01312.41
5.4.210.0080.00512.31
5.4.200.0030.01012.20
5.4.190.0090.00512.25
5.4.180.0080.00412.41
5.4.170.0100.00912.28
5.4.160.0000.01212.29
5.4.150.0070.00712.23
5.4.140.0030.01012.25
5.4.130.0070.00612.14
5.4.120.0070.00712.38
5.4.110.0080.00712.14
5.4.100.0060.00812.16
5.4.90.0060.00612.34
5.4.80.0030.01212.37
5.4.70.0100.00312.03
5.4.60.0090.00412.25
5.4.50.0030.01012.37
5.4.40.0030.01012.26
5.4.30.0070.00712.38
5.4.20.0030.01412.26
5.4.10.0030.01412.28
5.4.00.0060.00612.37
5.3.290.0030.01412.96
5.3.280.0030.01012.81
5.3.270.0070.00712.70
5.3.260.0000.01412.83
5.3.250.0000.01312.80
5.3.240.0110.00512.65
5.3.230.0110.00312.84
5.3.220.0110.00812.84
5.3.210.0040.01112.83
5.3.200.0120.00612.70
5.3.190.0030.01312.76
5.3.180.0030.01113.03
5.3.170.0080.00512.95
5.3.160.0050.00913.02
5.3.150.0100.00712.89
5.3.140.0030.01212.83
5.3.130.0050.00812.80
5.3.120.0060.01212.76
5.3.110.0070.01012.78
5.3.100.0090.01012.96
5.3.90.0110.00713.09
5.3.80.0070.01012.82
5.3.70.0090.00612.80
5.3.60.0060.00912.89
5.3.50.0090.00612.91
5.3.40.0110.00712.89
5.3.30.0000.01412.73
5.3.20.0050.00812.86
5.3.10.0090.00612.60
5.3.00.0070.00712.61
5.2.170.0060.01011.88
5.2.160.0040.01111.85
5.2.150.0190.00011.89
5.2.140.0100.00811.98
5.2.130.0050.01011.79
5.2.120.0090.00611.79
5.2.110.0110.00311.81
5.2.100.0030.01411.85
5.2.90.0160.00011.79
5.2.80.0170.00311.94
5.2.70.0060.01111.79
5.2.60.0090.00711.61
5.2.50.0110.00311.79
5.2.40.0100.00512.09
5.2.30.0110.00411.82
5.2.20.0100.00311.76
5.2.10.0080.00811.57
5.2.00.0040.01111.46
5.1.60.0050.01111.06
5.1.50.0030.01110.80
5.1.40.0060.01210.96
5.1.30.0030.01011.09
5.1.20.0120.00610.94
5.1.10.0130.00211.13
5.1.00.0110.00910.98
5.0.50.0100.00310.10
5.0.40.0100.00710.01
5.0.30.0070.00710.07
5.0.20.0160.00010.07
5.0.10.0110.00310.01
5.0.00.0070.00710.01
4.4.90.0000.00910.01
4.4.80.0070.00010.01
4.4.70.0000.00810.01
4.4.60.0050.00310.01
4.4.50.0040.00410.01
4.4.40.0040.00410.01
4.4.30.0080.00010.01
4.4.20.0000.00810.01
4.4.10.0070.00510.01
4.4.00.0040.00410.01
4.3.110.0040.00810.01
4.3.100.0090.00010.01
4.3.90.0040.00410.01
4.3.80.0090.00010.01
4.3.70.0070.00010.01
4.3.60.0080.00010.01
4.3.50.0000.00810.01
4.3.40.0070.00010.01
4.3.30.0030.00310.01
4.3.20.0000.00810.01
4.3.10.0050.00510.01
4.3.00.0050.00510.01

preferences:
176.58 ms | 403 KiB | 5 Q