3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'test'; $key = openssl_random_pseudo_bytes(16); $iv = openssl_random_pseudo_bytes(16); $cipher = mcrypt_encrypt( MCRYPT_RIJNDAEL_128, $key, $message, MCRYPT_MODE_CBC, $iv ); $plain = openssl_decrypt( $cipher, 'aes-128-cbc', $key, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING, $iv ); //try to detect null padding if (mb_strlen($iv, '8bit') % mb_strlen($plain, '8bit') == 0) { preg_match_all('#([\0]+)$#', $plain, $matches); if (mb_strlen($matches[1][0], '8bit') > 1) { $plain = rtrim($plain, "\0"); trigger_error('Detected and stripped null padding. Please double-check results!'); } } 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.0100.01017.97
8.4.10.0090.00617.84
8.3.140.0030.00717.24
8.3.130.0040.00418.34
8.3.120.0060.00320.67
8.3.110.0040.00416.77
8.3.100.0100.01016.73
8.3.90.0050.00326.77
8.3.80.0070.00319.36
8.3.70.0110.00617.64
8.3.60.0070.01018.55
8.3.50.0110.00822.09
8.3.40.0040.01118.67
8.3.30.0140.00019.05
8.3.20.0000.00720.29
8.3.10.0080.00021.91
8.3.00.0140.00019.68
8.2.260.0060.00316.88
8.2.250.0080.00018.57
8.2.240.0110.00717.05
8.2.230.0040.00720.94
8.2.220.0030.01337.54
8.2.210.0060.01326.77
8.2.200.0060.00318.88
8.2.190.0070.01416.88
8.2.180.0140.00318.29
8.2.170.0100.00322.96
8.2.160.0070.00722.16
8.2.150.0030.00525.66
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0040.00720.72
8.2.110.0080.00020.89
8.2.100.0040.00817.59
8.2.90.0040.00818.09
8.2.80.0000.00820.54
8.2.70.0070.00517.35
8.2.60.0030.00517.80
8.2.50.0050.00218.10
8.2.40.0040.00419.38
8.2.30.0040.00417.97
8.2.20.0000.00717.67
8.2.10.0060.00318.02
8.2.00.0040.00418.11
8.1.310.0030.01018.66
8.1.300.0060.00318.17
8.1.290.0090.00030.84
8.1.280.0060.01525.92
8.1.270.0040.00420.38
8.1.260.0050.00226.35
8.1.250.0120.00328.09
8.1.240.0030.00619.12
8.1.230.0070.00420.96
8.1.220.0090.00017.74
8.1.210.0040.00418.85
8.1.200.0030.00617.22
8.1.190.0080.00017.10
8.1.180.0000.00818.10
8.1.170.0080.00017.62
8.1.160.0050.00322.01
8.1.150.0040.00418.79
8.1.140.0070.00017.36
8.1.130.0070.00017.40
8.1.120.0000.00717.45
8.1.110.0040.00417.48
8.1.100.0030.00517.37
8.1.90.0030.00517.35
8.1.80.0040.00617.33
8.1.70.0020.00617.41
8.1.60.0060.00517.53
8.1.50.0060.00317.44
8.1.40.0070.00317.47
8.1.30.0050.00517.57
8.1.20.0050.00517.53
8.1.10.0060.00617.48
8.1.00.0080.00517.46
8.0.300.0040.00419.91
8.0.290.0000.00716.63
8.0.280.0030.00518.13
8.0.270.0030.00317.10
8.0.260.0030.00316.92
8.0.250.0000.00716.96
8.0.240.0030.00316.80
8.0.230.0030.00616.99
8.0.220.0060.00516.89
8.0.210.0070.00516.91
8.0.200.0050.00516.97
8.0.190.0070.00516.87
8.0.180.0070.00516.93
8.0.170.0100.00216.88
8.0.160.0000.01116.74
8.0.150.0020.01016.90
8.0.140.0060.00516.84
8.0.130.0130.00726.29
8.0.120.0090.00316.83
8.0.110.0070.00416.91
8.0.100.0060.00516.86
8.0.90.0040.00716.82
8.0.80.0090.00716.85
8.0.70.0050.00616.82
8.0.60.0040.00816.91
8.0.50.0050.00516.94
8.0.30.0080.00817.14
8.0.20.0140.00517.25
8.0.10.0150.00517.13
8.0.00.0110.00616.79
7.4.330.0030.00516.76
7.4.320.0060.00016.54
7.4.300.0090.00316.55
7.4.290.0040.00516.53
7.4.280.0070.00316.53
7.4.270.0050.00416.45
7.4.260.0060.00316.47
7.4.250.0070.00216.55
7.4.240.0040.00416.48
7.4.230.0070.00316.45
7.4.220.0050.00516.56
7.4.210.0120.00616.58
7.4.200.0050.00416.69
7.4.190.0070.00416.60
7.4.180.0050.00916.59
7.4.160.0110.00316.56
7.4.150.0100.00616.98
7.4.140.0120.00917.07
7.4.130.0120.00616.48
7.4.120.0100.00816.44
7.4.110.0090.01216.37
7.4.100.0070.01216.34
7.4.90.0130.00416.44
7.4.80.0130.00217.23
7.4.70.0120.00616.21
7.4.60.0120.00316.45
7.4.50.0060.00616.54
7.4.40.0070.00816.32
7.4.30.0080.00816.49
7.4.20.0110.00316.33
7.4.10.0090.00816.15
7.4.00.0080.01015.93
7.3.330.0060.00514.71
7.3.320.0080.00314.67
7.3.310.0090.00216.28
7.3.300.0070.00316.32
7.3.290.0050.00616.25
7.3.280.0110.00616.28
7.3.270.0090.00716.90
7.3.260.0110.00616.22
7.3.250.0080.01016.27
7.3.240.0120.00616.27
7.3.230.0120.00716.37
7.3.220.0160.00316.24
7.3.210.0070.01216.19
7.3.200.0090.00817.24
7.3.190.0100.00816.23
7.3.180.0100.00816.26
7.3.170.0110.00616.20
7.3.160.0080.00816.25
7.3.150.0080.00916.30
7.3.140.0110.00616.32
7.3.130.0140.00515.94
7.3.120.0070.01015.93
7.3.110.0100.00815.71
7.3.100.0080.00915.56
7.3.90.0070.00715.66
7.3.80.0080.00815.68
7.3.70.0080.00915.59
7.3.60.0090.00715.55
7.3.50.0060.01015.60
7.3.40.0080.00915.57
7.3.30.0100.00715.61
7.3.20.0100.00715.91
7.3.10.0100.00715.86
7.3.00.0100.00515.85
7.2.340.0090.00616.33
7.2.330.0140.00316.38
7.2.320.0130.00516.46
7.2.310.0090.00816.34
7.2.300.0070.01216.33
7.2.290.0090.01016.39
7.2.280.0120.00516.05
7.2.270.0090.00716.31
7.2.260.0110.00816.03
7.2.250.0100.00816.01
7.2.240.0070.00815.87
7.2.230.0080.00915.69
7.2.220.0100.00615.71
7.2.210.0090.00715.68
7.2.200.0100.00715.72
7.2.190.0050.01115.69
7.2.180.0090.00815.70
7.2.170.0080.00915.67
7.2.160.0070.01115.74
7.2.150.0100.00915.96
7.2.140.0090.00916.09
7.2.130.0130.00716.03
7.2.120.0100.00716.06
7.2.110.0090.00716.04
7.2.100.0120.00616.07
7.2.90.0110.00516.02
7.2.80.0100.00816.00
7.2.70.0120.00716.07
7.2.60.0090.00816.08
7.2.50.0110.00915.95
7.2.40.0120.00816.13
7.2.30.0100.00916.11
7.2.20.0090.00816.04
7.2.10.0120.01116.05
7.2.00.0130.00916.04
7.1.330.0090.00616.59
7.1.320.0100.00714.88
7.1.310.0100.00914.87
7.1.300.0110.00514.92
7.1.290.0120.00614.84
7.1.280.0100.00814.80
7.1.270.0080.00814.75
7.1.260.0080.00814.72
7.1.250.0090.00914.83
7.1.240.0100.00714.87
7.1.230.0080.00814.82
7.1.220.0080.00914.81
7.1.210.0090.00814.90
7.1.200.0100.00714.83
7.1.190.0110.00714.86
7.1.180.0110.00614.79
7.1.170.0100.01014.80
7.1.160.0090.00714.87
7.1.150.0100.00714.91
7.1.140.0110.01014.82
7.1.130.0110.01014.82
7.1.120.0100.00714.84
7.1.110.0100.00714.85
7.1.100.0120.00614.77
7.1.90.0110.00614.84
7.1.80.0140.00914.86
7.1.70.0090.00714.75
7.1.60.0070.01014.81
7.1.50.0080.00914.82
7.1.40.0080.00914.94
7.1.30.0110.00814.77
7.1.20.0090.00914.85
7.1.10.0110.00814.81
7.1.00.0100.00714.87
7.0.330.0160.00517.28
7.0.320.0130.00620.17
7.0.310.0120.00614.34
7.0.300.0140.00414.46
7.0.290.0120.00714.40
7.0.280.0080.01014.34
7.0.270.0130.01014.35
7.0.260.0110.00714.46
7.0.250.0120.00914.52
7.0.240.0080.00814.47
7.0.230.0110.00714.47
7.0.220.0110.00814.41
7.0.210.0080.00814.48
7.0.200.0100.00914.50
7.0.190.0080.00714.49
7.0.180.0110.00714.36
7.0.170.0120.00714.54
7.0.160.0140.00814.42
7.0.150.0140.00714.51
7.0.140.0080.00814.54
7.0.130.0100.00614.42
7.0.120.0070.01114.39
7.0.110.0120.00614.41
7.0.100.0100.01014.47
7.0.90.0140.00614.35
7.0.80.0120.00414.44
7.0.70.0090.00814.42
7.0.60.0090.00714.44
7.0.50.0080.00814.43
7.0.40.0070.01014.41
7.0.30.0110.00614.43
7.0.20.0070.00914.34
7.0.10.0100.00714.43
7.0.00.0080.00914.42
5.6.400.0130.00415.07
5.6.390.0090.00815.03
5.6.380.0100.00815.09
5.6.370.0090.00815.21
5.6.360.0090.00915.19
5.6.350.0110.00715.09
5.6.340.0100.00815.07
5.6.330.0130.01015.04
5.6.320.0100.01015.10
5.6.310.0090.00915.04
5.6.300.0100.00915.16
5.6.290.0060.01215.11
5.6.280.0080.00815.05
5.6.270.0080.01115.11
5.6.260.0080.01014.94
5.6.250.0120.00915.15
5.6.240.0110.00715.01
5.6.230.0110.00614.97
5.6.220.0100.00815.04
5.6.210.0090.00815.00
5.6.200.0110.00714.95
5.6.190.0120.00815.10
5.6.180.0090.00914.99
5.6.170.0110.00915.08
5.6.160.0100.00815.00
5.6.150.0120.01315.07
5.6.140.0110.00715.08
5.6.130.0090.01015.06
5.6.120.0090.00915.01
5.6.110.0100.00714.83
5.6.100.0100.00814.78
5.6.90.0120.00714.80
5.6.80.0070.01014.68
5.6.70.0100.00714.88
5.6.60.0110.00914.91
5.6.50.0110.00714.90
5.6.40.0090.00714.93
5.6.30.0110.00814.80
5.6.20.0080.00914.81
5.6.10.0100.00614.95
5.6.00.0080.00715.00
5.5.380.0100.01014.97
5.5.370.0150.01114.97
5.5.360.0130.00714.88
5.5.350.0130.00714.96
5.5.340.0100.01014.96
5.5.330.0110.01114.93
5.5.320.0140.00815.01
5.5.310.0120.00914.91
5.5.300.0150.00614.88
5.5.290.0100.01014.81
5.5.280.0120.00714.97
5.5.270.0120.00814.25
5.5.260.0120.00814.31
5.5.250.0100.01014.29
5.5.240.0100.00914.36
5.5.230.0090.01014.28
5.5.220.0120.00714.29
5.5.210.0080.01014.32
5.5.200.0110.00714.26
5.5.190.0100.00814.38
5.5.180.0090.00914.25
5.5.170.0120.00714.78
5.5.160.0080.00914.38
5.5.150.0080.00814.41
5.5.140.0090.00714.36
5.5.130.0070.00914.29
5.5.120.0080.00814.32
5.5.110.0090.00814.46
5.5.100.0110.00714.31
5.5.90.0090.00814.34
5.5.80.0100.00814.33
5.5.70.0100.00714.37
5.5.60.0090.00814.30
5.5.50.0080.00814.29
5.5.40.0100.00714.30
5.5.30.0120.00514.36
5.5.20.0100.00714.26
5.5.10.0080.00814.35
5.5.00.0090.00614.51
5.4.450.0060.00811.86
5.4.440.0090.00511.86
5.4.430.0100.00411.73
5.4.420.0080.00811.66
5.4.410.0100.00511.73
5.4.400.0100.00411.72
5.4.390.0090.00711.64
5.4.380.0100.00611.70
5.4.370.0070.00711.66
5.4.360.0090.00611.70
5.4.350.0110.00411.69
5.4.340.0090.00411.69
5.4.330.0080.00611.72
5.4.320.0070.00711.71
5.4.310.0060.00711.77
5.4.300.0080.00511.71
5.4.290.0060.00911.66
5.4.280.0060.00811.68
5.4.270.0080.00511.65
5.4.260.0090.00511.64
5.4.250.0060.00711.72
5.4.240.0090.00411.62
5.4.230.0080.00511.53
5.4.220.0090.00411.63
5.4.210.0080.00511.58
5.4.200.0080.00611.60
5.4.190.0060.00711.67
5.4.180.0080.00711.61
5.4.170.0100.00411.62
5.4.160.0050.00911.62
5.4.150.0100.00411.65
5.4.140.0080.00611.69
5.4.130.0080.00511.76
5.4.120.0070.00611.61
5.4.110.0070.00811.63
5.4.100.0100.00411.65
5.4.90.0080.00611.64
5.4.80.0100.00511.70
5.4.70.0060.00711.65
5.4.60.0100.00617.40
5.4.50.0080.00611.63
5.4.40.0070.00711.61
5.4.30.0090.00411.71
5.4.20.0090.00511.65
5.4.10.0080.00611.66
5.4.00.0070.00811.67
4.3.60.0040.00137.54

preferences:
100.14 ms | 403 KiB | 5 Q