3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DES{ public static function encrypt($str,$key){ $str = self::pkcs5_pad($str, 8); if (strlen($str) % 8) { $str = str_pad($str, strlen($str) + 8 - strlen($str) % 8, "\0"); } $sign = openssl_encrypt ( $str, 'DES-EDE3' , $key, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING , '' ); return strtoupper(bin2hex($sign)); } private static function pkcs5_pad($text, $blocksize) { $pad = $blocksize - (strlen($text) % $blocksize); return $text . str_repeat(chr($pad), $pad); } } $res = DES::encrypt('test', 'aaaabbbb'); var_dump($res);

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.130.0150.00517.98
8.4.120.0040.00420.61
8.4.110.0120.00919.02
8.4.100.0110.01017.96
8.4.90.0120.00820.52
8.4.80.0040.00418.89
8.4.70.0140.00618.72
8.4.60.0070.00820.29
8.4.50.0110.01018.66
8.4.40.0040.01519.69
8.4.30.0100.00717.75
8.4.20.0090.00619.71
8.4.10.0060.00319.82
8.3.260.0130.00616.76
8.3.250.0100.00918.74
8.3.240.0110.00516.86
8.3.230.0100.01016.62
8.3.220.0040.00419.03
8.3.210.0090.00916.62
8.3.200.0050.00416.73
8.3.190.0100.00817.08
8.3.180.0090.00716.75
8.3.170.0070.00720.72
8.3.160.0180.00016.82
8.3.150.0140.00718.96
8.3.140.0130.00617.21
8.3.130.0090.00018.64
8.3.120.0070.00318.81
8.3.110.0030.01620.94
8.3.100.0090.00024.06
8.3.90.0080.00026.77
8.3.80.0030.00619.36
8.3.70.0060.00916.88
8.3.60.0120.00318.55
8.3.50.0070.00818.33
8.3.40.0100.01018.80
8.3.30.0150.00018.89
8.3.20.0000.00821.90
8.3.10.0000.00823.48
8.3.00.0090.00019.68
8.2.290.0080.01117.18
8.2.280.0090.00618.66
8.2.270.0160.00317.13
8.2.260.0080.00019.02
8.2.250.0000.00816.96
8.2.240.0130.00618.91
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0070.00318.55
8.2.190.0110.00416.63
8.2.180.0140.00716.34
8.2.170.0140.00019.05
8.2.160.0100.00322.14
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00721.13
8.2.110.0060.00320.35
8.2.100.0060.00617.72
8.2.90.0000.00917.75
8.2.80.0060.00317.97
8.2.70.0030.00517.63
8.2.60.0060.00317.75
8.2.50.0000.00817.80
8.2.40.0050.00519.35
8.2.30.0070.00019.35
8.2.20.0000.00818.00
8.2.10.0000.00818.09
8.2.00.0080.00018.13
8.1.330.0100.00816.44
8.1.320.0110.01018.07
8.1.310.0080.00816.68
8.1.300.0080.00216.57
8.1.290.0060.00318.88
8.1.280.0040.01125.92
8.1.270.0070.00023.99
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0090.00023.76
8.1.230.0000.01122.10
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0080.00017.36
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0000.00818.78
8.1.150.0040.00420.29
8.1.140.0040.00417.71
8.1.130.0030.00519.05
8.1.120.0030.00317.40
8.1.110.0040.00417.42
8.1.100.0070.00017.39
8.1.90.0050.00317.40
8.1.80.0080.00017.45
8.1.70.0000.00717.45
8.1.60.0030.00517.65
8.1.50.0040.00417.45
8.1.40.0050.00217.55
8.1.30.0000.00817.67
8.1.20.0030.00617.66
8.1.10.0000.00717.66
8.1.00.0040.00417.59
8.0.300.0060.00319.77
8.0.290.0050.00516.88
8.0.280.0000.00718.48
8.0.270.0040.00316.91
8.0.260.0000.00716.93
8.0.250.0040.00416.97
8.0.240.0040.00416.99
8.0.230.0040.00416.96
8.0.220.0070.00016.94
8.0.210.0040.00416.95
8.0.200.0000.00816.95
8.0.190.0040.00417.02
8.0.180.0000.00716.91
8.0.170.0000.00916.89
8.0.160.0030.00816.91
8.0.150.0030.00616.89
8.0.140.0000.00716.94
8.0.130.0030.00313.43
8.0.120.0000.00716.94
8.0.110.0040.00417.05
8.0.100.0080.00016.89
8.0.90.0000.00716.88
8.0.80.0100.00917.03
8.0.70.0040.00416.93
8.0.60.0080.00016.94
8.0.50.0050.00217.06
8.0.30.0080.01117.12
8.0.20.0120.01117.40
8.0.10.0070.00016.96
8.0.00.0090.00816.69
7.4.330.0020.00215.55
7.4.320.0020.00516.54
7.4.300.0030.00316.68
7.4.290.0040.00416.56
7.4.280.0040.00416.63
7.4.270.0040.00416.66
7.4.260.0070.00016.65
7.4.250.0000.00716.61
7.4.240.0000.00816.69
7.4.230.0070.00016.70
7.4.220.0050.00316.59
7.4.210.0110.00316.56
7.4.200.0030.00316.29
7.4.160.0110.00716.63
7.4.150.0140.00617.40
7.4.140.0100.00917.86
7.4.130.0130.01016.47
7.4.120.0100.00916.50
7.4.110.0100.00716.55
7.4.100.0100.00716.80
7.4.90.0160.00316.43
7.4.80.0150.00819.39
7.4.70.0090.00916.68
7.4.60.0060.00916.57
7.4.50.0140.00416.41
7.4.40.0030.01416.57
7.4.10.0040.01414.81
7.4.00.0020.01614.94
7.3.330.0030.00313.52
7.3.320.0030.00313.47
7.3.310.0080.00016.42
7.3.300.0000.00716.41
7.3.290.0090.00816.44
7.3.280.0080.00716.47
7.3.270.0150.00717.40
7.3.260.0110.00916.45
7.3.240.0080.01116.49
7.3.230.0110.00516.38
7.3.210.0140.00416.45
7.3.200.0060.01516.46
7.3.190.0120.00616.44
7.3.180.0100.00616.62
7.3.170.0130.00316.64
7.3.160.0030.02116.66
7.3.130.0060.01315.10
7.3.120.0040.01514.68
7.3.110.0130.00314.91
7.3.100.0030.01014.98
7.3.90.0070.00414.94
7.3.80.0030.01314.59
7.3.70.0070.00714.96
7.3.60.0000.00914.94
7.3.50.0060.00914.85
7.3.40.0120.00314.99
7.3.30.0100.00714.84
7.3.20.0030.01316.84
7.3.10.0050.00716.76
7.3.00.0050.00816.73
7.2.330.0100.01016.74
7.2.320.0090.00916.45
7.2.310.0100.01016.65
7.2.300.0070.01116.63
7.2.290.0060.01516.69
7.2.260.0080.01215.07
7.2.250.0030.01514.95
7.2.240.0100.00314.99
7.2.230.0040.01114.69
7.2.220.0060.00914.72
7.2.210.0080.00414.77
7.2.200.0090.00615.02
7.2.190.0000.01215.18
7.2.180.0060.00315.03
7.2.170.0040.00415.16
7.2.160.0040.01115.14
7.2.150.0000.01416.92
7.2.140.0090.00617.00
7.2.130.0050.00816.96
7.2.120.0050.00916.95
7.2.110.0060.00716.77
7.2.100.0080.00516.98
7.2.90.0060.00616.73
7.2.80.0070.00416.84
7.2.70.0060.00816.97
7.2.60.0060.00816.94
7.2.50.0050.01316.95
7.2.40.0080.00516.95
7.2.30.0080.00517.08
7.2.20.0090.01017.18
7.2.10.0070.01417.11
7.2.00.0080.01117.34
7.1.330.0030.01015.77
7.1.320.0040.01115.72
7.1.310.0090.00315.74
7.1.300.0030.00915.63
7.1.290.0030.00715.79
7.1.280.0060.00315.80
7.1.270.0030.00815.68
7.1.260.0060.00615.70
7.1.250.0030.00815.71
7.1.240.0000.01315.63
7.1.230.0090.00915.55
7.1.220.0030.01015.52
7.1.210.0040.00415.88
7.1.200.0060.00615.84
7.1.190.0030.01015.76
7.1.180.0110.00715.76
7.1.170.0130.00015.95
7.1.160.0150.00015.68
7.1.150.0060.00315.73
7.1.140.0100.00716.15
7.1.130.0110.01216.44
7.1.120.0100.00816.29
7.1.110.0080.01216.12
7.1.100.0090.01115.95
7.1.90.0090.00915.82
7.1.80.0100.00615.68
7.1.70.0110.00615.65
7.1.60.0510.00724.47
7.1.50.0250.00724.31
7.1.40.0240.00924.27
7.1.30.0160.01224.09
7.1.20.0160.01524.12
7.1.10.0080.01015.29
7.1.00.0090.01115.39
7.0.330.0030.01015.18
7.0.320.0080.00615.36
7.0.310.0080.00315.61
7.0.300.0040.00415.11
7.0.290.0080.00415.47
7.0.280.0030.00915.50
7.0.270.0100.00015.60
7.0.260.0040.01115.16
7.0.250.0070.00715.43
7.0.240.0030.01015.41
7.0.230.0060.00615.23
7.0.220.0120.00315.48
7.0.210.0060.00615.60
7.0.200.0120.00015.18
7.0.190.0000.01315.39
7.0.180.0030.01015.24
7.0.170.0030.01215.16
7.0.160.0040.01115.53
7.0.150.0080.00015.16
7.0.140.0000.01315.27
7.0.130.0000.01115.53
7.0.120.0080.00415.21
7.0.110.0100.00715.32
7.0.100.0130.00315.45
7.0.90.0030.01015.27
7.0.80.0060.00615.50
7.0.70.0070.00315.45
7.0.60.0090.00315.27
7.0.50.0110.00415.30
7.0.40.0060.00913.51
7.0.30.0080.00413.56
7.0.20.0050.00513.46
7.0.10.0000.01513.50
7.0.00.0050.00513.57
5.6.400.0080.00414.55
5.6.390.0060.01014.37
5.6.380.0080.00314.12
5.6.370.0030.00914.66
5.6.360.0000.00814.62
5.6.350.0060.00914.48
5.6.340.0060.00614.35
5.6.330.0070.00314.38
5.6.320.0080.00514.55
5.6.310.0090.00614.30
5.6.300.0070.00714.03
5.6.290.0090.00614.36
5.6.280.0060.00614.51
5.6.270.0040.00814.55
5.6.260.0000.00914.58
5.6.250.0000.00914.64
5.6.240.0060.00614.63
5.6.230.0090.00614.45
5.6.220.0000.01114.39
5.6.210.0040.00814.56
5.6.200.0060.01014.21
5.6.190.0030.00914.30
5.6.180.0030.00714.55
5.6.170.0040.01114.09
5.6.160.0030.00614.24
5.6.150.0060.00614.21
5.6.140.0060.00914.25
5.6.130.0030.01014.41
5.6.120.0070.00714.35
5.6.110.0070.00714.44
5.6.100.0030.00714.56
5.6.90.0060.00914.09
5.6.80.0030.01214.44
5.6.70.0030.01014.07
5.6.60.0030.01314.09
5.6.50.0070.00614.35
5.6.40.0100.00314.28
5.6.30.0030.00614.21
5.6.20.0120.00614.22
5.6.10.0040.00414.21
5.6.00.0090.00414.16

preferences:
33.06 ms | 403 KiB | 5 Q