3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt($input, $key) { $size = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $input = pkcs5_pad($input, $size); $td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, ''); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_URAND); mcrypt_generic_init($td, $key, $iv); $data = mcrypt_generic($td, $iv . $input); mcrypt_generic_deinit($td); mcrypt_module_close($td); $data = base64_encode($data); return $data; } function pkcs5_pad ($text, $blocksize) { $pad = $blocksize - (strlen($text) % $blocksize); return $text . str_repeat(chr($pad), $pad); } function pkcs5_unpad($text) { $pad = ord($text{strlen($text)-1}); if ($pad > strlen($text)) return false; if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) return false; return substr($text, 0, -1 * $pad); } echo encrypt("1ocguknaus90psu76h0fnk7efsi9t2e1:tribus123", "1ocguknaus90psu76h0fnk7efsi9t2e1"); ?>

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.0070.00718.55
8.3.50.0120.00522.87
8.3.40.0060.00918.81
8.3.30.0070.00719.09
8.3.20.0040.00420.33
8.3.10.0060.00320.42
8.3.00.0070.00420.88
8.2.180.0150.00418.30
8.2.170.0040.01122.96
8.2.160.0100.00322.16
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0060.01326.16
8.2.120.0040.00419.36
8.2.110.0000.00920.54
8.2.100.0060.00617.53
8.2.90.0050.00319.09
8.2.80.0070.00019.25
8.2.70.0040.00417.50
8.2.60.0080.00017.80
8.2.50.0060.00618.07
8.2.40.0000.00819.95
8.2.30.0000.00719.45
8.2.20.0040.00417.54
8.2.10.0070.00017.85
8.2.00.0040.00417.43
8.1.280.0040.01125.92
8.1.270.0080.00022.11
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00322.33
8.1.230.0000.01120.96
8.1.220.0060.00318.77
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0040.00417.41
8.1.180.0030.00518.10
8.1.170.0040.00418.50
8.1.160.0090.00018.67
8.1.150.0040.00418.68
8.1.140.0000.00817.31
8.1.130.0000.00717.76
8.1.120.0080.00017.36
8.1.110.0050.00317.34
8.1.100.0000.00717.26
8.1.90.0030.00317.29
8.1.80.0040.00417.29
8.1.70.0040.00417.30
8.1.60.0100.00017.48
8.1.50.0040.00417.29
8.1.40.0040.00417.25
8.1.30.0040.00417.56
8.1.20.0040.00417.44
8.1.10.0050.00317.28
8.1.00.0050.00317.32
8.0.300.0000.00819.77
8.0.290.0040.00417.05
8.0.280.0040.00418.33
8.0.270.0030.00317.04
8.0.260.0030.00317.05
8.0.250.0030.00316.88
8.0.240.0030.00316.72
8.0.230.0030.00316.89
8.0.220.0000.00816.89
8.0.210.0040.00416.71
8.0.200.0000.00616.96
8.0.190.0030.00616.77
8.0.180.0040.00416.84
8.0.170.0040.00416.78
8.0.160.0000.00716.82
8.0.150.0050.00316.80
8.0.140.0040.00416.66
8.0.130.0030.00313.29
8.0.120.0080.00016.81
8.0.110.0070.00016.85
8.0.100.0070.00016.81
8.0.90.0040.00416.94
8.0.80.0100.00716.83
8.0.70.0070.00016.72
8.0.60.0000.00816.67
8.0.50.0000.00816.69
8.0.30.0090.01016.97
8.0.20.0090.01017.40
8.0.10.0000.00717.00
8.0.00.0110.00716.54
7.4.330.0000.00515.08
7.4.320.0000.00616.49
7.4.300.0030.00316.54
7.4.290.0060.00316.46
7.4.280.0070.00016.57
7.4.270.0000.00716.48
7.4.260.0050.00216.33
7.4.250.0040.00416.41
7.4.240.0040.00416.49
7.4.230.0000.00716.45
7.4.220.0000.00716.55
7.4.210.0150.00616.46
7.4.200.0070.00016.34
7.4.160.0060.00916.55
7.4.150.0060.01217.40
7.4.140.0110.00917.86
7.4.130.0110.01116.51
7.4.120.0120.00916.33
7.4.110.0030.01416.66
7.4.100.0090.00916.40
7.4.90.0110.00716.46
7.4.80.0140.00319.39
7.4.70.0070.01116.72
7.4.60.0120.00316.53
7.4.50.0030.00616.31
7.4.40.0120.00916.41
7.4.30.0080.01616.15
7.4.10.0080.01015.16
7.4.00.0050.01214.95
7.3.330.0020.00213.39
7.3.320.0000.00513.20
7.3.310.0000.00816.19
7.3.300.0000.00716.33
7.3.290.0050.01016.29
7.3.280.0080.00916.30
7.3.270.0060.01317.40
7.3.260.0100.00716.46
7.3.250.0110.00616.35
7.3.240.0000.01616.48
7.3.230.0000.01616.39
7.3.210.0110.00716.22
7.3.200.0120.00619.39
7.3.190.0040.01516.35
7.3.180.0090.00616.49
7.3.170.0110.01116.35
7.3.160.0070.01016.48
7.3.130.0110.00714.70
7.3.120.0110.00714.99
7.3.110.0070.01314.95
7.3.100.0060.00914.71
7.3.90.0000.01814.69
7.3.80.0070.00714.86
7.3.70.0090.00614.88
7.3.60.0100.00314.81
7.3.50.0040.00914.61
7.3.40.0090.00614.44
7.3.30.0080.00814.55
7.3.20.0030.00616.67
7.3.10.0100.00616.39
7.3.00.0100.00316.45
7.2.330.0260.03516.36
7.2.320.0090.01216.66
7.2.310.0100.00716.66
7.2.300.0100.00716.36
7.2.290.0130.00416.29
7.2.260.0120.00615.13
7.2.250.0140.00314.81
7.2.240.0060.00614.79
7.2.230.0030.01315.12
7.2.220.0000.01115.03
7.2.210.0000.01114.89
7.2.200.0120.00314.91
7.2.190.0100.00715.00
7.2.180.0060.00614.92
7.2.170.0060.00915.07
7.2.160.0030.00814.65
7.2.150.0030.00616.63
7.2.140.0030.00916.74
7.2.130.0090.00916.69
7.2.120.0100.00516.64
7.2.110.0060.01016.61
7.2.100.0110.00716.62
7.2.90.0080.00516.50
7.2.80.0080.00816.53
7.2.70.0090.00516.70
7.2.60.0050.00916.71
7.2.50.0100.00816.63
7.2.40.0080.00916.52
7.2.30.0070.00916.50
7.2.20.0110.00516.57
7.2.10.0090.01016.68
7.2.00.0050.00917.42
7.1.330.0040.00715.70
7.1.320.0030.01315.65
7.1.310.0000.01415.34
7.1.300.0120.00015.48
7.1.290.0000.01115.47
7.1.280.0030.01415.64
7.1.270.0060.00615.76
7.1.260.0060.00615.64
7.1.250.0080.00715.42
7.1.240.0090.00315.38
7.1.230.0000.01415.61
7.1.220.0060.00615.53
7.1.210.0030.01315.40
7.1.200.0020.00615.51
7.1.190.0000.01115.63
7.1.180.0070.00715.41
7.1.170.0140.00315.70
7.1.160.0030.00715.45
7.1.150.0040.00715.41
7.1.140.0030.01215.56
7.1.130.0000.01315.43
7.1.120.0040.01115.71
7.1.110.0040.00415.70
7.1.100.0090.00816.89
7.1.90.0070.00415.75
7.1.80.0080.01015.57
7.1.70.0040.00716.38
7.1.60.0080.00917.35
7.1.50.0050.01216.17
7.1.40.0040.01115.75
7.1.30.0070.00715.57
7.1.20.0040.00815.80
7.1.10.0130.00315.75
7.1.00.0040.03918.84
7.0.330.0070.00714.98
7.0.320.0130.00015.21
7.0.310.0070.00715.30
7.0.300.0090.00015.33
7.0.290.0110.00415.29
7.0.280.0080.00415.43
7.0.270.0030.00615.07
7.0.260.0030.00615.36
7.0.250.0000.01315.47
7.0.240.0030.01015.30
7.0.230.0060.00315.37
7.0.220.0050.00515.36
7.0.210.0040.01115.30
7.0.200.0050.00615.99
7.0.190.0060.00915.16
7.0.180.0030.00915.48
7.0.170.0070.00715.08
7.0.160.0000.01515.39
7.0.150.0100.00715.08
7.0.140.0000.02518.68
7.0.130.0090.00315.43
7.0.120.0000.01315.19
7.0.110.0060.01015.42
7.0.100.0120.00015.32
7.0.90.0070.00315.26
7.0.80.0030.00615.32
7.0.70.0030.01215.35
7.0.60.0030.04717.60
7.0.50.0080.04516.64
7.0.40.0030.05016.61
7.0.30.0080.02816.71
7.0.20.0140.04116.83
7.0.10.0130.03816.80
7.0.00.0030.05116.56
5.6.400.0030.00614.25
5.6.390.0100.00614.12
5.6.380.0100.00714.20
5.6.370.0080.00514.20
5.6.360.0040.00813.72
5.6.350.0040.00414.14
5.6.340.0000.01314.18
5.6.330.0060.00913.94
5.6.320.0090.00314.27
5.6.310.0030.01114.36
5.6.300.0100.00614.22
5.6.290.0080.00314.00
5.6.280.0060.03417.61
5.6.270.0100.00714.25
5.6.260.0040.00814.23
5.6.250.0070.00314.07
5.6.240.0040.00714.28
5.6.230.0080.00313.99
5.6.220.0070.01014.24
5.6.210.0030.04817.29
5.6.200.0050.03316.10
5.6.190.0080.04217.32
5.6.180.0070.02917.29
5.6.170.0160.03117.18
5.6.160.0070.03017.44
5.6.150.0000.04916.16
5.6.140.0080.02716.03
5.6.130.0130.03816.14
5.6.120.0060.02917.48
5.6.110.0030.03217.72
5.6.100.0130.04417.64
5.6.90.0080.04217.57
5.6.80.0050.03317.25
5.6.70.0130.04617.32
5.6.60.0000.01313.82
5.6.50.0070.00714.13
5.6.40.0090.00014.00
5.6.30.0070.00714.09
5.6.20.0100.00313.96
5.6.10.0030.01213.88
5.6.00.0070.00714.12
5.5.380.0060.00613.82
5.5.370.0070.00413.93
5.5.360.0030.01013.69
5.5.350.0040.02517.16
5.5.340.0070.02716.07
5.5.330.0070.04217.03
5.5.320.0150.03317.14
5.5.310.0160.03017.21
5.5.300.0080.02116.14
5.5.290.0010.02916.12
5.5.280.0080.02817.55
5.5.270.0080.02117.39
5.5.260.0120.03817.54
5.5.250.0070.03217.44
5.5.240.0090.04617.17
5.5.230.0070.00713.84
5.5.220.0070.00713.74
5.5.210.0090.00613.82
5.5.200.0070.00713.64
5.5.190.0040.00814.06
5.5.180.0090.00314.00
5.5.170.0040.00713.85
5.5.160.0120.00314.15
5.5.150.0120.00313.54
5.5.140.0030.00614.27
5.5.130.0060.00314.12
5.5.120.0030.01313.94
5.5.110.0040.01114.01
5.5.100.0060.00314.10
5.5.90.0080.00013.84
5.5.80.0000.01314.13
5.5.70.0000.01213.67
5.5.60.0030.01313.79
5.5.50.0060.00313.80
5.5.40.0060.00313.98
5.5.30.0040.01113.94
5.5.20.0000.01113.79
5.5.10.0030.00613.98
5.5.00.0000.01513.75
5.4.450.0150.02618.16
5.4.440.0080.03017.10
5.4.430.0190.02216.21
5.4.420.0150.01716.14
5.4.410.0120.02015.96
5.4.400.0220.02315.50
5.4.390.0120.01815.46
5.4.380.0180.02615.46
5.4.370.0170.02315.42
5.4.360.0170.02015.42
5.4.350.0040.02311.80
5.4.340.0040.02311.80
5.4.330.0040.00411.58
5.4.320.0080.02212.04
5.4.310.0030.02612.04
5.4.300.0080.01912.05
5.4.290.0100.02712.04
5.4.280.0060.03311.99
5.4.270.0090.03011.99
5.4.260.0080.02111.99
5.4.250.0020.02511.99
5.4.240.0050.03111.99
5.4.230.0080.02811.99
5.4.220.0060.02311.99
5.4.210.0040.02411.99
5.4.200.0070.02211.99
5.4.190.0130.04711.99
5.4.180.0100.03511.98
5.4.170.0050.02811.99
5.4.160.0070.02711.99
5.4.150.0040.02311.99
5.4.140.0040.02311.83
5.4.130.0040.02211.82
5.4.120.0070.01811.80
5.4.110.0060.02111.80
5.4.100.0070.02511.80
5.4.90.0100.02511.80
5.4.80.0050.02411.80
5.4.70.0070.03211.80
5.4.60.0100.02311.80
5.4.50.0080.02011.80
5.4.40.0070.03211.79
5.4.30.0070.02411.79
5.4.20.0070.02411.79
5.4.10.0040.02311.79
5.4.00.0020.02411.54
5.3.290.0090.04012.80
5.3.280.0060.04012.70
5.3.270.0120.04412.72
5.3.260.0090.05112.72
5.3.250.0060.05012.72
5.3.240.0060.04912.72
5.3.230.0100.03612.71
5.3.220.0070.03712.68
5.3.210.0100.03912.68
5.3.200.0080.04112.68
5.3.190.0070.03812.68
5.3.180.0040.04112.67
5.3.170.0110.05012.67
5.3.160.0110.03912.68
5.3.150.0040.04212.68
5.3.140.0050.03812.66
5.3.130.0070.03912.66
5.3.120.0060.04012.66
5.3.110.0100.03412.66
5.3.100.0030.04012.13
5.3.90.0060.03812.11
5.3.80.0110.03212.11
5.3.70.0060.03912.11
5.3.60.0060.03712.09
5.3.50.0050.04112.04
5.3.40.0130.03812.04
5.3.30.0090.05512.00
5.3.20.0130.05411.77
5.3.10.0080.04211.74
5.3.00.0080.04511.73
5.2.170.0070.0389.23
5.2.160.0040.0379.23
5.2.150.0130.0359.23
5.2.140.0060.0429.23
5.2.130.0070.0289.19
5.2.120.0030.0319.19
5.2.110.0070.0309.20
5.2.100.0060.0439.19
5.2.90.0050.0369.19
5.2.80.0080.0419.18
5.2.70.0060.0379.19
5.2.60.0050.0399.14
5.2.50.0120.0369.12
5.2.40.0060.0339.09
5.2.30.0040.0319.06
5.2.20.0090.0279.05
5.2.10.0060.0288.95
5.2.00.0080.0298.82
5.1.60.0060.0248.11
5.1.50.0040.0288.10
5.1.40.0060.0328.08
5.1.30.0100.0338.43
5.1.20.0060.0358.45
5.1.10.0050.0348.18
5.1.00.0060.0308.19
5.0.50.0050.0196.67
5.0.40.0050.0226.52
5.0.30.0050.0336.33
5.0.20.0040.0276.30
5.0.10.0050.0286.29
5.0.00.0030.0346.28
4.4.90.0050.0154.78
4.4.80.0030.0174.76
4.4.70.0030.0174.75
4.4.60.0060.0144.76
4.4.50.0060.0244.77
4.4.40.0050.0294.71
4.4.30.0050.0154.76
4.4.20.0030.0164.85
4.4.10.0040.0154.85
4.4.00.0030.0264.76
4.3.110.0040.0184.66
4.3.100.0050.0144.66
4.3.90.0050.0144.63
4.3.80.0020.0284.58
4.3.70.0030.0154.63
4.3.60.0050.0184.63
4.3.50.0050.0154.62
4.3.40.0030.0254.54
4.3.30.0030.0163.32
4.3.20.0030.0173.30
4.3.10.0020.0163.27
4.3.00.0000.02018.58

preferences:
62.32 ms | 401 KiB | 5 Q