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 = "15874873782"; $encrypted_string = "Jg7GpP1uxf+qTBEzBQTu5Q=="; // 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 = mdecrypt_generic($secret_key, $encrypted_string); 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.0100.00616.63
8.3.50.0030.01621.05
8.3.40.0040.01118.83
8.3.30.0070.00718.90
8.3.20.0040.00420.21
8.3.10.0080.00021.79
8.3.00.0040.00417.63
8.2.180.0110.00716.50
8.2.170.0100.01018.91
8.2.160.0070.00722.96
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00821.00
8.2.110.0080.00320.99
8.2.100.0000.01117.91
8.2.90.0000.00917.84
8.2.80.0000.00817.97
8.2.70.0040.00417.36
8.2.60.0090.00017.93
8.2.50.0050.00318.07
8.2.40.0000.00718.22
8.2.30.0000.00717.92
8.2.20.0070.00017.73
8.2.10.0000.00717.99
8.2.00.0000.00718.04
8.1.280.0110.00425.92
8.1.270.0040.00420.35
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0040.00422.50
8.1.230.0000.01221.00
8.1.220.0030.00617.74
8.1.210.0070.00418.84
8.1.200.0030.00617.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0040.00418.49
8.1.160.0000.00721.95
8.1.150.0070.00018.73
8.1.140.0040.00417.41
8.1.130.0100.00017.55
8.1.120.0040.00417.45
8.1.110.0070.00017.34
8.1.100.0000.00717.38
8.1.90.0040.00417.29
8.1.80.0030.00817.28
8.1.70.0000.00717.30
8.1.60.0060.00317.52
8.1.50.0000.00917.40
8.1.40.0040.00417.49
8.1.30.0000.00917.68
8.1.20.0000.00817.61
8.1.10.0040.00417.59
8.1.00.0110.00017.42
8.0.300.0040.00419.75
8.0.290.0040.00416.75
8.0.280.0000.00718.38
8.0.270.0070.00017.13
8.0.260.0060.00017.18
8.0.250.0000.00716.84
8.0.240.0030.00317.01
8.0.230.0000.00716.99
8.0.220.0030.00316.79
8.0.210.0070.00016.82
8.0.200.0070.00017.02
8.0.190.0000.00816.95
8.0.180.0040.00816.90
8.0.170.0000.00716.84
8.0.160.0030.00516.79
8.0.150.0030.00316.73
8.0.140.0040.00416.73
8.0.130.0030.00313.29
8.0.120.0080.00016.88
8.0.110.0000.00716.90
8.0.100.0040.00416.79
8.0.90.0000.00716.71
8.0.80.0060.00916.82
8.0.70.0000.00716.79
8.0.60.0000.00716.95
8.0.50.0000.00816.84
8.0.30.0160.00517.15
8.0.20.0110.00717.40
8.0.10.0000.00717.04
8.0.00.0100.01116.81
7.4.330.0030.00315.03
7.4.320.0030.00316.55
7.4.300.0060.00016.65
7.4.290.0000.00716.55
7.4.280.0040.00416.46
7.4.270.0070.00016.61
7.4.260.0030.00316.56
7.4.250.0040.00416.54
7.4.240.0070.00016.52
7.4.230.0070.00016.61
7.4.220.0120.01216.53
7.4.210.0030.01616.47
7.4.200.0020.00516.50
7.4.160.0070.00716.36
7.4.150.0090.00917.40
7.4.140.0120.00617.86
7.4.130.0080.01216.59
7.4.120.0110.00816.53
7.4.110.0040.01316.49
7.4.100.0050.01516.49
7.4.90.0140.00416.56
7.4.80.0120.00919.39
7.4.70.0100.01016.50
7.4.60.0090.00916.41
7.4.50.0050.00316.30
7.4.40.0060.01016.45
7.4.30.0170.00016.45
7.4.10.0120.00414.77
7.4.00.0070.01015.02
7.3.330.0060.00313.05
7.3.320.0030.00313.17
7.3.310.0000.00716.34
7.3.300.0030.00316.16
7.3.290.0100.00716.31
7.3.280.0080.00916.25
7.3.270.0130.00317.40
7.3.260.0100.00716.43
7.3.250.0120.00616.34
7.3.240.0090.01216.32
7.3.230.0100.01316.39
7.3.210.0220.00016.22
7.3.200.0130.00519.39
7.3.190.0140.00316.26
7.3.180.0080.00816.22
7.3.170.0030.01416.29
7.3.160.0120.00416.24
7.3.130.0060.01315.02
7.3.120.0080.00914.87
7.3.110.0070.00914.69
7.3.100.0050.01014.82
7.3.90.0080.00414.66
7.3.80.0050.00714.82
7.3.70.0080.00914.85
7.3.60.0090.00314.65
7.3.50.0060.00814.68
7.3.40.0030.01014.61
7.3.30.0050.00614.63
7.3.20.0120.00216.65
7.3.10.0030.00916.59
7.3.00.0040.00916.57
7.2.330.0100.01016.55
7.2.320.0060.01016.49
7.2.310.0070.01116.21
7.2.300.0170.00316.29
7.2.290.0060.01216.55
7.2.260.0090.01214.52
7.2.250.0090.00414.81
7.2.240.0080.00914.81
7.2.230.0050.01114.79
7.2.220.0060.00314.86
7.2.210.0070.00714.66
7.2.200.0040.01014.94
7.2.190.0070.00614.68
7.2.180.0070.00714.92
7.2.170.0060.00614.77
7.2.160.0030.00614.68
7.2.150.0070.00416.83
7.2.140.0040.01116.65
7.2.130.0100.00316.79
7.2.120.0070.00516.78
7.2.110.0000.01516.72
7.2.100.0050.00716.77
7.2.90.0080.00316.73
7.2.80.0070.00716.59
7.2.70.0060.00716.69
7.2.60.0020.01116.78
7.2.50.0020.01016.68
7.2.40.0040.00716.74
7.2.30.0070.00516.71
7.2.20.0030.01116.65
7.2.10.0030.01116.88
7.2.00.0040.01117.63
7.1.330.0110.00115.63
7.1.320.0030.00815.51
7.1.310.0050.00915.46
7.1.300.0020.01315.45
7.1.290.0080.00415.54
7.1.280.0090.00615.56
7.1.270.0050.00715.66
7.1.260.0050.01015.73
7.1.250.0060.00615.62
7.1.240.0070.00715.54
7.1.230.0070.00715.72
7.1.220.0050.00915.65
7.1.210.0060.00615.74
7.1.200.0070.00715.54
7.1.190.0070.00415.68
7.1.180.0050.01115.46
7.1.170.0060.00915.51
7.1.160.0110.00315.54
7.1.150.0030.00915.62
7.1.140.0080.00415.59
7.1.130.0060.00415.54
7.1.120.0030.01015.51
7.1.110.0030.00815.42
7.1.100.0040.00816.49
7.1.90.0020.01115.70
7.1.80.0020.01115.51
7.1.70.0040.00616.17
7.1.60.0070.00916.98
7.1.50.0090.00816.00
7.1.40.0070.00615.51
7.1.30.0080.00715.66
7.1.20.0040.00515.69
7.1.10.0030.00715.56
7.1.00.0060.03117.81
7.0.330.0060.00615.21
7.0.320.0110.00215.20
7.0.310.0040.00915.13
7.0.300.0040.00715.15
7.0.290.0030.00715.29
7.0.280.0040.01115.23
7.0.270.0020.00915.09
7.0.260.0060.00715.16
7.0.250.0080.00615.31
7.0.240.0020.00915.26
7.0.230.0080.00615.32
7.0.220.0030.00715.20
7.0.210.0080.00515.33
7.0.200.0090.00815.70
7.0.190.0070.00615.20
7.0.180.0080.00515.12
7.0.170.0040.00915.24
7.0.160.0060.00615.26
7.0.150.0020.01015.33
7.0.140.0040.00515.03
7.0.130.0060.00615.32
7.0.120.0040.00715.33
7.0.110.0040.00715.35
7.0.100.0050.00815.34
7.0.90.0040.00515.27
7.0.80.0040.00915.36
7.0.70.0070.00615.15
7.0.60.0060.02016.86
7.0.50.0050.03216.12
7.0.40.0070.02415.69
7.0.30.0080.02315.56
7.0.20.0110.01615.61
7.0.10.0030.02215.73
7.0.00.0030.02015.49
5.6.400.0090.00614.42
5.6.390.0000.01114.18
5.6.380.0100.00514.15
5.6.370.0100.00313.96
5.6.360.0090.00214.21
5.6.350.0030.00714.20
5.6.340.0090.00514.46
5.6.330.0020.01014.09
5.6.320.0100.00214.30
5.6.310.0020.01114.00
5.6.300.0010.01214.45
5.6.290.0030.00714.25
5.6.280.0060.02716.51
5.6.270.0060.00614.07
5.6.260.0030.00713.96
5.6.250.0070.00614.17
5.6.240.0060.00814.06
5.6.230.0050.00914.10
5.6.220.0050.00814.04
5.6.210.0070.02616.32
5.6.200.0050.03015.47
5.6.190.0030.02416.15
5.6.180.0200.02516.34
5.6.170.0120.01416.08
5.6.160.0040.02416.19
5.6.150.0100.02915.54
5.6.140.0070.03115.55
5.6.130.0020.02015.48
5.6.120.0070.03116.34
5.6.110.0060.02216.46
5.6.100.0050.03316.29
5.6.90.0070.03216.46
5.6.80.0040.03016.10
5.6.70.0050.00814.10
5.6.60.0060.00314.05
5.6.50.0070.00713.94
5.6.40.0060.00513.94
5.6.30.0030.00713.97
5.6.20.0090.00514.11
5.6.10.0050.00614.11
5.6.00.0070.00614.03
5.5.380.0020.01212.19
5.5.370.0050.00812.60
5.5.360.0060.00312.47
5.5.350.0150.02915.12
5.5.340.0030.01714.27
5.5.330.0030.02115.16
5.5.320.0070.01815.02
5.5.310.0140.02815.16
5.5.300.0030.02414.37
5.5.290.0050.02314.27
5.5.280.0070.01815.16
5.5.270.0060.03215.15
5.5.260.0050.03215.11
5.5.250.0090.03015.14
5.5.240.0060.02814.99
5.5.230.0040.00412.36
5.5.220.0050.00412.45
5.5.210.0060.00312.47
5.5.200.0060.00412.43
5.5.190.0020.00712.30
5.5.180.0050.00612.57
5.5.170.0030.00712.45
5.5.160.0030.00912.22
5.5.150.0050.00712.41
5.5.140.0030.00912.39
5.5.130.0040.00712.31
5.5.120.0040.00912.43
5.5.110.0030.00912.41
5.5.100.0020.00912.53
5.5.90.0030.00812.24
5.5.80.0030.00912.42
5.5.70.0030.00912.40
5.5.60.0050.00512.52
5.5.50.0060.00612.52
5.5.40.0000.01212.23
5.5.30.0070.00512.26
5.5.20.0050.00512.40
5.5.10.0020.01012.17
5.5.00.0020.01112.41
5.4.450.0090.02413.72
5.4.440.0060.03013.68
5.4.430.0330.01813.55
5.4.420.0320.02413.65
5.4.410.0240.02013.63
5.4.400.0270.02013.61
5.4.390.0240.02413.42
5.4.380.0240.02113.65
5.4.370.0280.02113.61
5.4.360.0320.01713.44
5.4.350.0270.02313.61
5.4.340.0310.02213.57
5.4.330.0020.00710.75
5.4.320.0300.02313.51
5.4.310.0370.01913.54
5.4.300.0270.02113.48
5.4.290.0240.02213.61
5.4.280.0280.02313.45
5.4.270.0320.02213.64
5.4.260.0270.02313.67
5.4.250.0290.02013.42
5.4.240.0310.02913.54
5.4.230.0270.01913.58
5.4.220.0210.02113.39
5.4.210.0220.02413.47
5.4.200.0260.01912.74
5.4.190.0240.01913.43
5.4.180.0160.02513.43
5.4.170.0250.02013.49
5.4.160.0260.02413.36
5.4.150.0210.02013.31
5.4.140.0250.02112.53
5.4.130.0290.01612.64
5.4.120.0230.02012.67
5.4.110.0050.01912.68
5.4.100.0110.02412.71
5.4.90.0270.01412.67
5.4.80.0190.02712.57
5.4.70.0220.02212.70
5.4.60.0270.01812.53
5.4.50.0180.02412.68
5.4.40.0330.02612.82
5.4.30.0240.02312.72
5.4.20.0280.02012.71
5.4.10.0290.02112.52
5.4.00.0280.01812.50
5.3.290.0330.03112.43
5.3.280.0330.03212.42
5.3.270.0320.03012.40
5.3.260.0040.03212.35
5.3.250.0140.02512.34
5.3.240.0380.02912.38
5.3.230.0390.02912.35
5.3.220.0370.02412.34
5.3.210.0330.03212.40
5.3.200.0360.02612.34
5.3.190.0280.03512.35
5.3.180.0120.03112.35
5.3.170.0060.03312.45
5.3.160.0320.03112.45
5.3.150.0320.03112.38
5.3.140.0170.02812.40
5.3.130.0130.03212.46
5.3.120.0330.02812.43
5.3.110.0330.03012.32
5.3.100.0360.02612.19
5.3.90.0300.03012.19
5.3.80.0270.03012.21
5.3.70.0320.02812.07
5.3.60.0260.03312.21
5.3.50.0440.02312.04
5.3.40.0330.02812.13
5.3.30.0410.02412.01
5.3.20.0360.02611.93
5.3.10.0360.02511.92
5.3.00.0430.02711.84
5.2.170.0370.01710.75
5.2.160.0250.02510.70
5.2.150.0310.02510.60
5.2.140.0270.02410.70
5.2.130.0320.01810.64
5.2.120.0270.02010.63
5.2.110.0270.02410.68
5.2.100.0360.02210.63
5.2.90.0200.02710.65
5.2.80.0350.02210.72
5.2.70.0250.02410.62
5.2.60.0430.02910.69
5.2.50.0340.02410.60
5.2.40.0250.02310.62
5.2.30.0230.02310.53
5.2.20.0210.02210.58
5.2.10.0220.02210.52
5.2.00.0260.02010.45
5.1.60.0220.01810.09
5.1.50.0250.01810.08
5.1.40.0230.01810.03
5.1.30.0270.01910.29
5.1.20.0290.01810.32
5.1.10.0220.02110.10
5.1.00.0250.01910.12
5.0.50.0180.0139.35
5.0.40.0140.0169.32
5.0.30.0130.0219.19
5.0.20.0100.0179.18
5.0.10.0100.0209.13
5.0.00.0070.0279.13
4.4.90.0080.0158.02
4.4.80.0120.0128.01
4.4.70.0070.0138.02
4.4.60.0080.0138.00
4.4.50.0030.0118.05
4.4.40.0050.0178.02
4.4.30.0050.0118.01
4.4.20.0100.0128.06
4.4.10.0030.0148.08
4.4.00.0150.0168.02
4.3.110.0100.0157.98
4.3.100.0110.0128.01
4.3.90.0100.0127.99
4.3.80.0120.0187.95
4.3.70.0130.0138.02
4.3.60.0120.0138.01
4.3.50.0100.0138.04
4.3.40.0070.0237.94
4.3.30.0080.0137.39
4.3.20.0070.0127.36
4.3.10.0050.0137.31
4.3.00.0050.0158.71

preferences:
54.91 ms | 401 KiB | 5 Q