3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt($texttocrypt, $ky, $iv) { // $ky = '5rrdv4lkjdshfkl43bgd'; // Key from file // $iv = ; try { $encrypted = ""; $length = strlen($texttocrypt); $cipher = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, ''); mcrypt_generic_init($cipher, $ky, $iv); $encrypted = base64_encode(mcrypt_generic($cipher, $texttocrypt)); mcrypt_generic_deinit($cipher); $result1 = bin2hex($iv); $result2 = bin2hex($encrypted); $result = $result1 . $result2; return $result; } catch (Exception $e) { $this->lastError = "Error while encrypting '".$texttocrypt."' - ".$e->getMessage(); throw new Exception($this->lastError); } } echo encrypt('sup#own#hnf#15', 'jhfjdjj%6s77w', '234ghyjdGtskjd&7d6sj6w6hfkjhvfDw20');

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.01118.43
8.3.50.0070.01421.10
8.3.40.0120.00418.82
8.3.30.0070.01118.59
8.3.20.0050.00220.28
8.3.10.0040.00423.57
8.3.00.0040.00423.51
8.2.180.0070.01116.88
8.2.170.0080.00822.96
8.2.160.0110.00422.26
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0060.00326.16
8.2.120.0070.00317.38
8.2.110.0050.00320.39
8.2.100.0040.00817.84
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0000.00917.80
8.2.50.0040.00418.07
8.2.40.0030.00521.14
8.2.30.0040.00418.05
8.2.20.0040.00417.70
8.2.10.0000.00718.05
8.2.00.0040.00418.07
8.1.280.0100.00625.92
8.1.270.0060.00320.43
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00323.80
8.1.230.0090.00322.82
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.00
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0050.00318.52
8.1.160.0000.00721.94
8.1.150.0000.00718.74
8.1.140.0040.00417.39
8.1.130.0000.00717.59
8.1.120.0000.00717.30
8.1.110.0000.00817.36
8.1.100.0030.00617.46
8.1.90.0080.00017.34
8.1.80.0060.00317.31
8.1.70.0030.00317.27
8.1.60.0000.00817.50
8.1.50.0070.00017.51
8.1.40.0060.00317.48
8.1.30.0060.00317.44
8.1.20.0000.00817.66
8.1.10.0000.00717.61
8.1.00.0000.00917.50
8.0.300.0050.00318.77
8.0.290.0040.00416.63
8.0.280.0030.00318.45
8.0.270.0050.00217.20
8.0.260.0000.00617.07
8.0.250.0050.00216.94
8.0.240.0030.00316.85
8.0.230.0100.00016.84
8.0.220.0030.00316.86
8.0.210.0030.00316.93
8.0.200.0070.00016.85
8.0.190.0000.00916.82
8.0.180.0040.00416.79
8.0.170.0040.00416.93
8.0.160.0000.00716.93
8.0.150.0030.00516.93
8.0.140.0040.00416.86
8.0.130.0080.00013.32
8.0.120.0040.00416.89
8.0.110.0000.00716.81
8.0.100.0000.00716.88
8.0.90.0040.00416.81
8.0.80.0110.01116.96
8.0.70.0040.00416.70
8.0.60.0070.00016.96
8.0.50.0050.00316.79
8.0.30.0110.00817.02
8.0.20.0120.00617.40
8.0.10.0050.00316.89
8.0.00.0130.00616.78
7.4.330.0020.00215.20
7.4.320.0040.00416.57
7.4.300.0040.00416.61
7.4.290.0000.00716.50
7.4.280.0000.00816.50
7.4.270.0030.00316.43
7.4.260.0000.00716.58
7.4.250.0040.00416.45
7.4.240.0070.00016.56
7.4.230.0030.00316.64
7.4.220.0100.01016.63
7.4.210.0090.00616.61
7.4.200.0030.00316.59
7.4.160.0120.00416.52
7.4.150.0100.00717.40
7.4.140.0200.00217.86
7.4.130.0070.00916.54
7.4.120.0110.00816.60
7.4.110.0170.00016.50
7.4.100.0140.00416.65
7.4.90.0120.00616.68
7.4.80.0100.00719.39
7.4.70.0060.01016.37
7.4.60.0160.00016.48
7.4.50.0090.00016.36
7.4.40.0190.00316.44
7.4.30.0100.01016.73
7.4.00.0070.00715.14
7.3.330.0020.00213.38
7.3.320.0030.00313.23
7.3.310.0000.00716.48
7.3.300.0030.00316.32
7.3.290.0110.00416.35
7.3.280.0120.00416.35
7.3.270.0100.00717.40
7.3.260.0110.00716.73
7.3.250.0060.01116.57
7.3.240.0140.00316.45
7.3.230.0120.00616.39
7.3.210.0100.00616.44
7.3.200.0090.00816.63
7.3.190.0060.00916.43
7.3.180.0040.01216.63
7.3.170.0110.00716.55
7.3.160.0100.00516.38
7.2.330.0120.00616.34
7.2.320.0090.00916.71
7.2.310.0120.00616.41
7.2.300.0150.01116.39
7.2.290.0120.01116.59
7.2.80.0040.00816.63
7.2.60.0080.00816.63
7.2.00.0030.01019.35
7.1.200.0040.00415.59
7.1.100.0060.00317.76
7.1.70.0050.00317.10
7.1.60.0060.01919.42
7.1.50.0140.01116.89
7.1.00.0030.07722.45
7.0.200.0150.00416.69
7.0.110.0070.08319.95
7.0.100.0130.07019.97
7.0.90.0100.08019.91
7.0.80.0130.06319.88
7.0.70.0130.07019.89
7.0.60.0070.05019.98
7.0.50.0100.08020.52
7.0.40.0070.08320.10
7.0.30.0130.08020.20
7.0.20.0170.07720.04
7.0.10.0130.07720.11
7.0.00.0030.08720.32
5.6.280.0100.06321.13
5.6.260.0170.06320.64
5.6.250.0100.07320.66
5.6.240.0030.08020.55
5.6.230.0070.05020.66
5.6.220.0070.07720.63
5.6.210.0130.07720.71
5.6.200.0130.08321.14
5.6.190.0170.07321.22
5.6.180.0170.06021.43
5.6.170.0170.05321.23
5.6.160.0200.06321.22
5.6.150.0130.07721.04
5.6.140.0070.08021.40
5.6.130.0070.08021.29
5.6.120.0030.09021.14
5.6.110.0100.08021.10
5.6.100.0130.08021.28
5.6.90.0170.08021.20
5.6.80.0030.05720.73
5.6.70.0030.08720.57
5.6.60.0200.06720.59
5.6.50.0030.08320.61
5.6.40.0100.07720.55
5.6.30.0000.08720.50
5.6.20.0070.08320.79
5.6.10.0170.06720.61
5.6.00.0030.04020.77
5.5.380.0100.07720.55
5.5.370.0100.07020.49
5.5.360.0100.07320.50
5.5.350.0200.07020.10
5.5.340.0230.06721.03
5.5.330.0030.08321.03
5.5.320.0100.07720.90
5.5.310.0030.07720.98
5.5.300.0030.08321.09
5.5.290.0030.09020.90
5.5.280.0170.08020.94
5.5.270.0200.07020.89
5.5.260.0100.07720.89
5.5.250.0170.06720.70
5.5.240.0070.07320.25
5.5.230.0070.08020.56
5.5.220.0030.08320.16
5.5.210.0070.08320.36
5.5.200.0070.07720.24
5.5.190.0100.04720.25
5.5.180.0070.08020.23
5.5.160.0130.04020.39
5.5.150.0100.07020.29
5.5.140.0070.05320.44
5.5.130.0000.07720.53
5.5.120.0070.07320.28
5.5.110.0070.08020.37
5.5.100.0070.03720.14
5.5.90.0100.08020.11
5.5.80.0130.07320.19
5.5.70.0100.05720.06
5.5.60.0070.08020.21
5.5.50.0130.08320.21
5.5.40.0000.08020.08
5.5.30.0130.04320.32
5.5.20.0030.08320.21
5.5.10.0030.05720.04
5.5.00.0130.07320.29
5.4.450.0030.08019.54
5.4.440.0130.07719.37
5.4.430.0030.05319.59
5.4.420.0000.07719.61
5.4.410.0070.08019.25
5.4.400.0030.07719.38
5.4.390.0030.07319.27
5.4.380.0070.04319.29
5.4.370.0100.06719.05
5.4.360.0070.07319.05
5.4.350.0170.07019.32
5.4.340.0000.08319.06
5.4.320.0000.08719.32
5.4.310.0100.07019.29
5.4.300.0070.07719.23
5.4.290.0100.07019.14
5.4.280.0000.05019.21
5.4.270.0030.07019.05
5.4.260.0100.06319.09
5.4.250.0130.06719.28
5.4.240.0030.08019.31
5.4.230.0170.07019.37
5.4.220.0070.07319.28
5.4.210.0000.08019.08
5.4.200.0070.04718.99
5.4.190.0070.05719.25
5.4.180.0070.07319.28
5.4.170.0100.07719.03
5.4.160.0070.07719.27
5.4.150.0000.05719.03
5.4.140.0070.04316.45
5.4.130.0070.05316.45
5.4.120.0200.05716.64
5.4.110.0100.07316.63
5.4.100.0100.07016.63
5.4.90.0070.05716.58
5.4.80.0030.08316.45
5.4.70.0070.07316.39
5.4.60.0030.04716.32
5.4.50.0170.03316.51
5.4.40.0030.07716.43
5.4.30.0170.05016.50
5.4.20.0100.04316.49
5.4.10.0030.05316.70
5.4.00.0070.04015.98
5.3.290.0070.08014.75
5.3.280.0000.07314.62
5.3.270.0100.04014.64
5.3.260.0030.08314.61
5.3.250.0070.08014.61
5.3.240.0030.07714.73
5.3.230.0030.06014.57
5.3.220.0030.07714.60
5.3.210.0100.07014.71
5.3.200.0070.07714.71
5.3.190.0130.05714.65
5.3.180.0030.05314.66
5.3.170.0030.07014.42
5.3.160.0130.07014.55
5.3.150.0070.06714.55
5.3.140.0130.07014.56
5.3.130.0070.07714.50
5.3.120.0170.07014.69
5.3.110.0030.07314.40
5.3.100.0070.07014.04
5.3.90.0100.07714.04
5.3.80.0170.06714.11
5.3.70.0100.03714.02
5.3.60.0070.05714.03
5.3.50.0070.07013.91
5.3.40.0100.06314.02
5.3.30.0130.06313.98
5.3.20.0070.07013.69
5.3.10.0100.05313.63
5.3.00.0130.03713.49
5.2.170.0070.06312.89
5.2.160.0100.05712.89
5.2.150.0100.06012.89
5.2.140.0070.03312.89
5.2.130.0070.08012.89
5.2.120.0100.05712.89
5.2.110.0200.04712.89
5.2.100.0030.06012.89
5.2.90.0070.05712.89
5.2.80.0030.06312.89
5.2.70.0000.06312.89
5.2.60.0070.03312.89
5.2.50.0030.05712.89
5.2.40.0030.05312.89
5.2.30.0030.06312.89
5.2.20.0100.03012.89
5.2.10.0070.06012.89
5.2.00.0130.05012.89
5.1.60.0070.05012.89
5.1.50.0070.05312.89
5.1.40.0030.05012.89
5.1.30.0030.05712.89
5.1.20.0030.05712.89
5.1.10.0030.03012.89
5.1.00.0030.06012.89
5.0.50.0030.04712.89
5.0.40.0100.03712.89
5.0.30.0070.06012.89
5.0.20.0030.02012.89
5.0.10.0030.04312.89
5.0.00.0030.06012.89
4.4.90.0000.02312.89
4.4.80.0000.03712.89
4.4.70.0000.03712.89
4.4.60.0000.03712.89
4.4.50.0000.04012.89
4.4.40.0000.05712.89
4.4.30.0030.02712.89
4.4.20.0030.03712.89
4.4.10.0000.03712.89
4.4.00.0000.06012.89
4.3.110.0000.03712.89
4.3.100.0000.03712.89
4.3.90.0030.03312.89
4.3.80.0070.05012.89
4.3.70.0030.03012.89
4.3.60.0000.03712.89
4.3.50.0070.03012.89
4.3.40.0000.05312.89
4.3.30.0030.03312.89
4.3.20.0030.01712.89
4.3.10.0030.03312.89
4.3.00.0030.03712.89

preferences:
51.99 ms | 401 KiB | 5 Q