3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pkcs7_pad($str) { $len = mb_strlen($str, '8bit'); $c = 16 - ($len % 16); $str .= str_repeat(chr($c), $c); return $str; } $message = 'test'; $key = openssl_random_pseudo_bytes(16); $iv = openssl_random_pseudo_bytes(16); $cipher = mcrypt_encrypt( MCRYPT_RIJNDAEL_128, $key, pkcs7_pad($message), MCRYPT_MODE_CBC, $iv ); $plain = openssl_decrypt( $cipher, 'aes-128-cbc', $key, OPENSSL_RAW_DATA, $iv ); var_dump( $message, bin2hex($cipher), $plain, mb_strlen($message, '8bit'), mb_strlen($plain, '8bit'), $message === $plain );

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.4.20.0040.01818.04
8.4.10.0060.00317.89
8.3.150.0080.01218.80
8.3.140.0070.01116.77
8.3.130.0000.00818.33
8.3.120.0060.00320.54
8.3.110.0070.00320.94
8.3.100.0040.00416.55
8.3.90.0060.01226.77
8.3.80.0060.00316.75
8.3.70.0140.00716.58
8.3.60.0160.00618.27
8.3.50.0140.00621.08
8.3.40.0100.00718.85
8.3.30.0090.00618.92
8.3.20.0080.00020.29
8.3.10.0050.00221.91
8.3.00.0080.00017.63
8.2.260.0070.00018.79
8.2.250.0170.00016.61
8.2.240.0120.00317.55
8.2.230.0000.00922.58
8.2.220.0060.00324.06
8.2.210.0070.00726.77
8.2.200.0060.00316.75
8.2.190.0060.00916.63
8.2.180.0110.00725.92
8.2.170.0100.01019.00
8.2.160.0070.00722.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0070.00019.64
8.2.110.0040.00720.84
8.2.100.0180.00418.61
8.2.90.0210.00317.51
8.2.80.0160.00518.17
8.2.70.0160.00517.55
8.2.60.0140.00718.57
8.2.50.0150.00517.76
8.2.40.0120.00719.02
8.2.30.0140.00518.24
8.2.20.0150.00517.58
8.2.10.0130.00717.77
8.2.00.0140.00417.73
8.1.310.0000.00818.63
8.1.300.0070.01016.23
8.1.290.0040.00430.84
8.1.280.0140.00725.92
8.1.270.0090.00021.95
8.1.260.0000.00726.35
8.1.250.0030.00528.09
8.1.240.0060.00622.80
8.1.230.0100.00418.53
8.1.220.0080.01117.60
8.1.210.0130.00618.09
8.1.200.0160.00417.38
8.1.190.0160.00817.08
8.1.180.0150.00517.76
8.1.170.0190.00217.96
8.1.160.0150.00518.20
8.1.150.0110.00918.10
8.1.140.0130.00717.37
8.1.130.0130.00717.40
8.1.120.0160.00417.41
8.1.110.0150.00417.35
8.1.100.0140.00617.35
8.1.90.0160.00417.43
8.1.80.0130.00717.41
8.1.70.0170.00318.16
8.1.60.0100.00917.42
8.1.50.0160.00317.42
8.1.40.0120.00817.42
8.1.30.0180.00317.52
8.1.20.0150.00718.24
8.1.10.0160.00517.47
8.1.00.0200.00017.45
8.0.300.0130.00618.09
8.0.290.0170.00317.02
8.0.280.0100.00717.86
8.0.270.0120.00617.08
8.0.260.0110.00817.12
8.0.250.0080.00617.94
8.0.240.0130.00717.18
8.0.230.0170.00117.15
8.0.220.0150.00517.15
8.0.210.0140.00517.18
8.0.200.0150.00317.15
8.0.190.0190.00217.13
8.0.180.0160.00317.17
8.0.170.0190.00217.16
8.0.160.0120.00717.14
8.0.150.0170.00117.11
8.0.140.0160.00417.13
8.0.130.0150.00515.35
8.0.120.0090.00615.83
8.0.110.0110.00515.87
8.0.100.0120.00315.84
8.0.90.0110.00415.81
8.0.80.0140.00215.89
8.0.70.0140.00215.81
8.0.60.0120.00315.87
8.0.50.0110.00415.84
8.0.30.0120.00616.19
8.0.20.0130.00516.63
8.0.10.0100.00515.89
8.0.00.0110.00716.20
7.4.330.0100.00416.22
7.4.320.0140.00216.91
7.4.300.0090.00816.96
7.4.290.0110.00817.23
7.4.280.0130.00516.96
7.4.270.0110.00716.99
7.4.260.0150.00217.03
7.4.250.0060.00414.32
7.4.240.0100.00315.95
7.4.230.0120.00316.40
7.4.220.0100.00815.74
7.4.210.0060.00916.20
7.4.200.0090.00215.70
7.4.190.0120.00315.33
7.4.180.0110.00415.38
7.4.160.0090.00615.69
7.4.150.0110.00516.17
7.4.140.0130.00616.62
7.4.130.0110.00615.92
7.4.120.0110.00515.95
7.4.110.0100.00815.76
7.4.100.0130.00515.70
7.4.90.0110.00515.75
7.4.80.0100.00816.67
7.4.70.0120.00415.66
7.4.60.0100.00615.70
7.4.50.0070.00515.72
7.4.40.0130.00415.70
7.4.30.0090.00615.75
7.4.20.0090.00615.34
7.4.10.0140.00215.34
7.4.00.0090.00615.20
7.3.330.0130.00315.36
7.3.320.0120.00515.27
7.3.310.0090.00515.61
7.3.300.0100.00315.62
7.3.290.0090.00815.82
7.3.280.0090.00715.94
7.3.270.0130.00315.99
7.3.260.0090.00815.73
7.3.250.0130.00715.98
7.3.240.0110.00415.68
7.3.230.0120.00415.75
7.3.220.0110.00415.31
7.3.210.0090.00815.66
7.3.200.0100.00516.69
7.3.190.0120.00515.66
7.3.180.0100.00615.67
7.3.170.0090.00715.76
7.3.160.0070.00815.75
7.3.150.0130.00215.26
7.3.140.0160.00115.42
7.3.130.0140.00215.31
7.3.120.0130.00215.32
7.3.110.0120.00415.13
7.3.100.0120.00415.10
7.3.90.0090.00615.10
7.3.80.0100.00615.15
7.3.70.0140.00115.04
7.3.60.0130.00215.28
7.3.50.0080.00615.16
7.3.40.0110.00415.33
7.3.30.0090.00615.04
7.3.20.0100.00515.75
7.3.10.0110.00515.78
7.3.00.0070.00916.02
7.2.340.0110.00916.57
7.2.330.0140.00515.74
7.2.320.0170.00215.72
7.2.310.0140.00715.61
7.2.300.0120.00715.68
7.2.290.0110.00915.68
7.2.280.0160.00315.36
7.2.270.0110.00815.25
7.2.260.0130.00615.24
7.2.250.0120.00715.35
7.2.240.0120.00515.17
7.2.230.0140.00215.12
7.2.220.0100.00915.18
7.2.210.0110.00615.11
7.2.200.0140.00415.22
7.2.190.0130.00515.15
7.2.180.0130.00415.24
7.2.170.0170.00616.10
7.2.160.0090.00715.15
7.2.150.0110.00716.11
7.2.140.0150.00515.93
7.2.130.0110.00616.27
7.2.120.0130.00316.21
7.2.110.0120.00516.21
7.2.100.0080.01016.24
7.2.90.0100.00816.17
7.2.80.0110.00716.24
7.2.70.0090.00916.10
7.2.60.0110.00716.25
7.2.50.0100.00716.19
7.2.40.0370.00816.75
7.2.30.0400.00616.92
7.2.20.0390.00716.81
7.2.10.0380.00916.89
7.2.00.0250.00817.65
7.1.330.0110.00715.11
7.1.320.0080.00815.16
7.1.310.0120.00514.99
7.1.300.0130.00315.03
7.1.290.0110.00515.07
7.1.280.0120.00415.12
7.1.270.0130.00315.00
7.1.260.0090.00715.06
7.1.250.0080.00615.20
7.1.240.0220.00515.22
7.1.230.0110.00615.26
7.1.220.0110.00715.18
7.1.210.0130.00415.23
7.1.200.0130.00515.21
7.1.190.0120.00515.21
7.1.180.0140.00415.16
7.1.170.0110.00615.20
7.1.160.0330.00915.75
7.1.150.0370.00815.72
7.1.140.0410.00815.77
7.1.130.0340.00815.75
7.1.120.0330.00615.79
7.1.110.0310.00815.53
7.1.100.0370.00615.51
7.1.90.0420.00615.66
7.1.80.0320.00815.59
7.1.70.0210.00715.55
7.1.60.0330.00720.67
7.1.50.0440.00620.61
7.1.40.0280.00720.45
7.1.30.0290.00920.41
7.1.20.0290.00920.43
7.1.10.0180.00615.28
7.1.00.0240.00815.86
7.0.330.0090.00614.89
7.0.320.0120.00515.02
7.0.310.0100.00515.00
7.0.300.0120.00615.04
7.0.290.0600.00715.48
7.0.280.0120.00414.89
7.0.270.0350.00915.58
7.0.260.0370.00815.58
7.0.250.0370.00615.42
7.0.240.0410.00615.47
7.0.230.0390.00815.37
7.0.220.0430.00515.36
7.0.210.0330.00714.90
7.0.200.0380.00815.25
7.0.190.0270.00915.29
7.0.180.0220.00815.09
7.0.170.0290.00815.20
7.0.160.0240.00915.11
7.0.150.0240.00715.07
7.0.140.0280.00815.21
7.0.130.0290.00715.19
7.0.120.0340.00715.17
7.0.110.0220.00915.17
7.0.100.0400.00715.09
7.0.90.0260.00615.12
7.0.80.0150.00715.16
7.0.70.0270.00915.11
7.0.60.0300.00615.16
7.0.50.0230.00815.08
7.0.40.0200.01014.95
7.0.30.0220.00714.95
7.0.20.0240.00614.88
7.0.10.0200.00914.86
7.0.00.0260.00514.88
5.6.400.0140.00414.67
5.6.390.0150.00414.58
5.6.380.0090.00714.67
5.6.370.0130.00514.58
5.6.360.0130.00314.51
5.6.350.0130.00514.54
5.6.340.0120.00414.64
5.6.330.0100.00814.45
5.6.320.0100.00814.59
5.6.310.0110.00514.53
5.6.300.0130.02717.27
5.6.290.0120.02917.32
5.6.280.0130.02517.30
5.6.270.0120.02517.28
5.6.260.0120.02517.31
5.6.250.0120.02617.23
5.6.240.0100.03017.32
5.6.230.0120.02717.23
5.6.220.0090.03117.37
5.6.210.0110.02817.24
5.6.200.0110.02817.30
5.6.190.0170.02517.29
5.6.180.0140.02617.28
5.6.170.0130.02917.27
5.6.160.0100.03017.31
5.6.150.0130.02517.31
5.6.140.0120.02717.20
5.6.130.0130.03017.26
5.6.120.0100.02917.24
5.6.110.0110.03117.32
5.6.100.0130.03417.24
5.6.90.0130.02817.21
5.6.80.0120.03016.94
5.6.70.0110.02616.89
5.6.60.0120.03116.96
5.6.50.0110.02916.96
5.6.40.0130.02516.96
5.6.30.0100.02616.95
5.6.20.0110.02816.94
5.6.10.0130.02817.01
5.6.00.0100.02917.00
5.5.380.0130.02515.46
5.5.370.0130.02715.50
5.5.360.0110.02815.45
5.5.350.0100.02615.39
5.5.340.0120.02715.69
5.5.330.0140.02515.70
5.5.320.0120.03115.61
5.5.310.0090.02815.68
5.5.300.0110.02515.65
5.5.290.0140.02715.69
5.5.280.0120.02715.68
5.5.270.0120.02915.61
5.5.260.0100.02715.67
5.5.250.0110.02915.66
5.5.240.0110.02415.48
5.5.230.0120.02715.38
5.5.220.0140.02815.48
5.5.210.0090.02915.45
5.5.200.0110.02615.42
5.5.190.0120.02415.35
5.5.180.0120.02615.38
5.5.170.0090.00813.87
5.5.160.0100.02715.35
5.5.150.0120.02615.37
5.5.140.0100.03015.38
5.5.130.0130.03015.25
5.5.120.0120.02815.28
5.5.110.0120.03015.40
5.5.100.0110.03115.30
5.5.90.0100.02515.35
5.5.80.0120.02415.36
5.5.70.0150.02315.37
5.5.60.0120.02115.29
5.5.50.0120.02915.37
5.5.40.0110.02615.38
5.5.30.0120.02715.32
5.5.20.0120.02615.35
5.5.10.0120.03115.35
5.5.00.0100.02615.33
5.4.450.0100.03216.01
5.4.440.0130.02816.02
5.4.430.0120.03115.94
5.4.420.0100.02715.97
5.4.410.0110.02515.95
5.4.400.0120.02615.80
5.4.390.0100.03015.78
5.4.380.0090.02415.83
5.4.370.0110.02415.86
5.4.360.0100.02615.83
5.4.350.0110.02415.85
5.4.340.0120.02515.84
5.4.330.0120.00313.38
5.4.320.0100.02815.83
5.4.310.0090.02915.87
5.4.300.0100.03315.81
5.4.290.0120.03015.84
5.4.280.0110.02715.88
5.4.270.0120.02815.88
5.4.260.0130.02715.84
5.4.250.0140.02415.82
5.4.240.0110.02715.89
5.4.230.0100.02515.82
5.4.220.0110.02515.77
5.4.210.0110.02815.79
5.4.200.0120.02115.77
5.4.190.0160.02315.77
5.4.180.0110.02315.84
5.4.170.0090.02615.84
5.4.160.0090.02615.81
5.4.150.0120.02515.78
5.4.140.0110.02414.78
5.4.130.0100.02314.73
5.4.120.0090.02214.74
5.4.110.0110.02114.72
5.4.100.0120.02314.79
5.4.90.0110.02414.79
5.4.80.0120.02414.82
5.4.70.0090.02414.76
5.4.60.0100.02314.77
5.4.50.0080.02514.70
5.4.40.0110.02314.73
5.4.30.0090.02614.78
5.4.20.0100.02414.80
5.4.10.0100.02314.77
5.4.00.0120.02314.52
5.3.40.0070.00716.24

preferences:
83.78 ms | 403 KiB | 5 Q