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&7d6sj6w6hfkvfDw20');

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.0120.00618.48
8.3.50.0180.00316.00
8.3.40.0210.00018.57
8.3.30.0130.00318.70
8.3.20.0030.00520.34
8.3.10.0040.00423.66
8.3.00.0050.00223.69
8.2.180.0150.00018.23
8.2.170.0060.00922.96
8.2.160.0100.00722.07
8.2.150.0030.00624.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0060.00317.25
8.2.110.0060.00320.53
8.2.100.0040.00817.72
8.2.90.0000.00919.22
8.2.80.0050.00317.97
8.2.70.0050.00517.50
8.2.60.0030.00518.04
8.2.50.0090.00018.07
8.2.40.0040.00420.93
8.2.30.0030.00618.04
8.2.20.0050.00317.73
8.2.10.0040.00417.93
8.2.00.0040.00418.13
8.1.280.0060.00925.92
8.1.270.0000.00820.39
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0000.00923.77
8.1.230.0060.00620.99
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0060.00318.65
8.1.160.0040.00422.00
8.1.150.0040.00318.73
8.1.140.0070.00017.33
8.1.130.0070.00017.65
8.1.120.0000.00717.39
8.1.110.0000.00817.29
8.1.100.0040.00417.38
8.1.90.0030.00717.37
8.1.80.0000.00817.31
8.1.70.0030.00317.27
8.1.60.0030.00617.55
8.1.50.0070.00017.51
8.1.40.0040.00417.54
8.1.30.0080.00017.51
8.1.20.0040.00417.66
8.1.10.0030.00617.60
8.1.00.0040.00417.56
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0020.00518.26
8.0.270.0000.00717.07
8.0.260.0030.00317.25
8.0.250.0000.00916.94
8.0.240.0030.00316.88
8.0.230.0040.00416.99
8.0.220.0070.00016.88
8.0.210.0040.00416.92
8.0.200.0030.00316.88
8.0.190.0000.00816.97
8.0.180.0000.00716.91
8.0.170.0040.00416.89
8.0.160.0040.00417.00
8.0.150.0040.00416.81
8.0.140.0040.00416.92
8.0.130.0030.00313.36
8.0.120.0000.00716.89
8.0.110.0050.00216.88
8.0.100.0080.00016.81
8.0.90.0040.00416.94
8.0.80.0090.01016.80
8.0.70.0000.00816.97
8.0.60.0050.00216.80
8.0.50.0000.00717.00
8.0.30.0090.00716.93
8.0.20.0110.00817.40
8.0.10.0000.00716.97
8.0.00.0070.01116.82
7.4.330.0020.00215.08
7.4.320.0030.00316.44
7.4.300.0000.00616.57
7.4.290.0030.00316.51
7.4.280.0050.00316.48
7.4.270.0030.00316.58
7.4.260.0070.00016.43
7.4.250.0040.00416.58
7.4.240.0020.00616.42
7.4.230.0000.00716.63
7.4.220.0060.01216.65
7.4.210.0090.00616.54
7.4.200.0000.00716.53
7.4.160.0060.01016.43
7.4.150.0120.00617.40
7.4.140.0130.01017.86
7.4.130.0080.01516.60
7.4.120.0090.01116.52
7.4.110.0030.01416.38
7.4.100.0130.01016.47
7.4.90.0090.00916.47
7.4.80.0070.01019.39
7.4.70.0130.00316.57
7.4.60.0040.01216.48
7.4.50.0000.00816.34
7.4.40.0080.00816.75
7.4.30.0220.00016.48
7.4.10.0060.00815.01
7.4.00.0070.01014.91
7.3.330.0050.00013.16
7.3.320.0000.00613.34
7.3.310.0000.00716.40
7.3.300.0030.00316.45
7.3.290.0130.00416.38
7.3.280.0080.00816.38
7.3.270.0190.00317.40
7.3.260.0060.01216.40
7.3.250.0090.00916.50
7.3.240.0150.00316.36
7.3.230.0080.01516.44
7.3.210.0110.00716.30
7.3.200.0020.01516.71
7.3.190.0050.01016.26
7.3.180.0080.00816.60
7.3.170.0140.00316.43
7.3.160.0080.01116.36
7.3.130.0070.01114.66
7.3.120.0050.01314.81
7.3.110.0100.00815.01
7.3.100.0080.00515.02
7.3.90.0060.00714.66
7.3.80.0050.00914.71
7.3.70.0040.01014.66
7.3.60.0090.00814.83
7.3.50.0110.00614.92
7.3.40.0030.00714.82
7.3.30.0030.01114.94
7.3.20.0060.00716.76
7.3.10.0050.00816.69
7.3.00.0060.00916.71
7.2.330.0070.01016.34
7.2.320.0100.00716.55
7.2.310.0000.01616.29
7.2.300.0120.01416.41
7.2.290.0060.01216.54
7.2.260.0070.01115.07
7.2.250.0090.00914.91
7.2.240.0050.00814.84
7.2.230.0040.01014.81
7.2.220.0080.00914.99
7.2.210.0050.00714.75
7.2.200.0050.00714.93
7.2.190.0000.01214.58
7.2.180.0000.01214.94
7.2.170.0040.00814.86
7.2.160.0080.00514.90
7.2.150.0050.01116.68
7.2.140.0050.00916.77
7.2.130.0100.00716.87
7.2.120.0040.01116.77
7.2.110.0090.00616.75
7.2.100.0090.00616.75
7.2.90.0040.00716.88
7.2.80.0070.00716.86
7.2.70.0070.00916.70
7.2.60.0070.00716.57
7.2.50.0020.01116.63
7.2.40.0050.01116.73
7.2.30.0070.00616.87
7.2.20.0070.00816.61
7.2.10.0080.00716.67
7.2.00.0030.01117.69
7.1.330.0070.00415.79
7.1.320.0050.01315.56
7.1.310.0030.01015.76
7.1.300.0070.00815.72
7.1.290.0080.00715.78
7.1.280.0090.00515.54
7.1.270.0050.00815.65
7.1.260.0040.01215.73
7.1.250.0050.00915.59
7.1.240.0060.00815.78
7.1.230.0050.01215.54
7.1.220.0080.00815.48
7.1.210.0070.00715.65
7.1.200.0030.01015.57
7.1.190.0050.00915.79
7.1.180.0080.00615.51
7.1.170.0050.00615.64
7.1.160.0050.00815.54
7.1.150.0070.00515.63
7.1.140.0050.00715.72
7.1.130.0060.00715.71
7.1.120.0070.00815.72
7.1.110.0020.00915.60
7.1.100.0040.00816.33
7.1.90.0070.00715.76
7.1.80.0080.00515.61
7.1.70.0050.00716.05
7.1.60.0050.01016.87
7.1.50.0090.00716.06
7.1.40.0080.00615.67
7.1.30.0050.00615.80
7.1.20.0070.00415.71
7.1.10.0060.00715.54
7.1.00.0080.02517.94
7.0.330.0070.00615.23
7.0.320.0060.00715.33
7.0.310.0060.00915.39
7.0.300.0010.00915.54
7.0.290.0050.00915.23
7.0.280.0050.00815.26
7.0.270.0030.00815.15
7.0.260.0090.00415.40
7.0.250.0070.00615.20
7.0.240.0080.00515.33
7.0.230.0030.00915.35
7.0.220.0080.00315.30
7.0.210.0050.00515.15
7.0.200.0120.00415.83
7.0.190.0060.00815.38
7.0.180.0050.00915.39
7.0.170.0060.00315.23
7.0.160.0050.00815.32
7.0.150.0030.01015.38
7.0.140.0050.00915.34
7.0.130.0030.00815.24
7.0.120.0060.00815.50
7.0.110.0080.00615.21
7.0.100.0060.00715.26
7.0.90.0100.00315.46
7.0.80.0080.00515.39
7.0.70.0070.00515.38
7.0.60.0080.03116.79
7.0.50.0050.03116.28
7.0.40.0060.03315.63
7.0.30.0070.02715.70
7.0.20.0140.02915.64
7.0.10.0020.02715.67
7.0.00.0020.02215.70
5.6.400.0060.01014.24
5.6.390.0050.00914.38
5.6.380.0060.01014.38
5.6.370.0080.00814.19
5.6.360.0060.00714.27
5.6.350.0060.00914.12
5.6.340.0050.00814.19
5.6.330.0080.00414.37
5.6.320.0000.00814.15
5.6.310.0120.00314.27
5.6.300.0060.00814.20
5.6.290.0000.00914.12
5.6.280.0090.02616.37
5.6.270.0040.00814.05
5.6.260.0060.00714.14
5.6.250.0050.00614.24
5.6.240.0060.00614.30
5.6.230.0000.01114.27
5.6.220.0040.00414.15
5.6.210.0020.02116.24
5.6.200.0060.01615.45
5.6.190.0050.03116.27
5.6.180.0190.02216.18
5.6.170.0150.01816.31
5.6.160.0070.03016.22
5.6.150.0050.02015.53
5.6.140.0130.02115.58
5.6.130.0080.03115.49
5.6.120.0050.02416.55
5.6.110.0080.03116.44
5.6.100.0050.03516.55
5.6.90.0080.03216.50
5.6.80.0040.03116.29
5.6.70.0050.01014.03
5.6.60.0060.00914.20
5.6.50.0030.00814.04
5.6.40.0070.00614.03
5.6.30.0040.00913.95
5.6.20.0100.00314.23
5.6.10.0050.00514.19
5.6.00.0050.00713.88
5.5.380.0070.00514.40
5.5.370.0030.01214.02
5.5.360.0020.00914.20
5.5.350.1460.01716.29
5.5.340.0040.02015.54
5.5.330.0050.02116.15
5.5.320.0110.02116.20
5.5.310.0170.02716.07
5.5.300.0080.01915.43
5.5.290.0070.02715.35
5.5.280.0080.02816.52
5.5.270.0070.03416.19
5.5.260.0030.02116.29
5.5.250.0060.02016.25
5.5.240.0030.03016.14
5.5.230.0090.00513.98
5.5.220.0080.00714.20
5.5.210.0090.00514.14
5.5.200.0040.01114.03
5.5.190.0020.01013.87
5.5.180.0050.00613.87
5.5.170.0050.00814.23
5.5.160.0050.01014.08
5.5.150.0040.00814.24
5.5.140.0030.01014.04
5.5.130.0070.00614.07
5.5.120.0030.01014.14
5.5.110.0090.00513.95
5.5.100.0070.00613.94
5.5.90.0070.00914.18
5.5.80.0030.01114.01
5.5.70.0060.00514.13
5.5.60.0040.01214.19
5.5.50.0030.01113.82
5.5.40.0050.00814.12
5.5.30.0070.00714.18
5.5.20.0030.01013.88
5.5.10.0080.00413.93
5.5.00.0020.01113.96
5.4.450.0310.02714.45
5.4.440.0290.02014.36
5.4.430.0250.02314.47
5.4.420.0310.02114.31
5.4.410.0290.02114.32
5.4.400.0290.02314.33
5.4.390.0290.02414.16
5.4.380.0330.02014.39
5.4.370.0320.02014.32
5.4.360.0240.02814.23
5.4.350.0260.02414.34
5.4.340.0250.02514.37
5.4.330.0040.00711.80
5.4.320.0290.02214.26
5.4.310.0320.02014.40
5.4.300.0340.01814.27
5.4.290.0300.02514.29
5.4.280.0260.02214.12
5.4.270.0240.02114.20
5.4.260.0230.02214.39
5.4.250.0380.02514.24
5.4.240.0330.03114.29
5.4.230.0320.02014.34
5.4.220.0330.03214.15
5.4.210.0230.02814.25
5.4.200.0330.02113.61
5.4.190.0320.02114.24
5.4.180.0280.02114.40
5.4.170.0220.02214.26
5.4.160.0260.01914.28
5.4.150.0270.02314.32
5.4.140.0280.02213.33
5.4.130.0270.02213.51
5.4.120.0280.01813.41
5.4.110.0230.02113.45
5.4.100.0220.02313.40
5.4.90.0260.01913.47
5.4.80.0330.02413.52
5.4.70.0270.02013.40
5.4.60.0280.01913.36
5.4.50.0350.02513.36
5.4.40.0280.02413.40
5.4.30.0250.02213.37
5.4.20.0350.02413.41
5.4.10.0330.02013.32
5.4.00.0290.02113.27
5.3.290.0830.06014.67
5.3.280.1100.05014.50
5.3.270.0900.04714.84
5.3.260.0870.05314.82
5.3.250.0930.05314.85
5.3.240.1000.05014.59
5.3.230.0870.05714.50
5.3.220.0800.05014.62
5.3.210.0830.05014.62
5.3.200.0770.04314.54
5.3.190.0670.05014.47
5.3.180.0730.05014.57
5.3.170.0670.05314.61
5.3.160.0670.05014.57
5.3.150.0770.05314.42
5.3.140.0870.05314.47
5.3.130.0830.06314.44
5.3.120.0770.07314.77
5.3.110.0700.06714.45
5.3.100.0700.04713.90
5.3.90.0730.04713.89
5.3.80.0800.05314.08
5.3.70.0770.05314.02
5.3.60.1030.04314.15
5.3.50.0830.05313.88
5.3.40.0700.05713.96
5.3.30.0670.06013.83
5.3.20.0970.03713.55
5.3.10.0630.05013.52
5.3.00.0730.04313.54
5.2.170.0630.03711.05
5.2.160.0730.02711.15
5.2.150.0600.03711.15
5.2.140.0500.04711.06
5.2.130.0570.04011.01
5.2.120.0500.04311.02
5.2.110.0500.04711.07
5.2.100.0500.04711.12
5.2.90.0600.04011.16
5.2.80.0600.03711.01
5.2.70.0700.05010.99
5.2.60.0730.03311.01
5.2.50.0670.04010.93
5.2.40.0500.03711.04
5.2.30.0600.04710.98
5.2.20.0500.04310.86
5.2.10.0300.04710.76
5.2.00.0430.04010.64
5.1.60.0530.02310.00
5.1.50.0430.03310.15
5.1.40.0500.0309.91
5.1.30.0430.03710.24
5.1.20.0530.02710.25
5.1.10.0330.0439.99
5.1.00.0470.03710.07
5.0.50.0270.0278.79
5.0.40.0270.0238.35
5.0.30.0300.0408.29
5.0.20.0270.0238.15
5.0.10.0230.0278.16
5.0.00.0330.0338.23
4.4.90.0230.0205.84
4.4.80.0230.0205.75
4.4.70.0230.0205.84
4.4.60.0200.0235.82
4.4.50.0200.0235.76
4.4.40.0100.0375.86
4.4.30.0170.0235.80
4.4.20.0200.0235.81
4.4.10.0170.0235.90
4.4.00.0270.0305.79
4.3.110.0230.0205.74
4.3.100.0230.0205.77
4.3.90.0230.0175.73
4.3.80.0200.0375.74
4.3.70.0200.0205.70
4.3.60.0170.0235.79
4.3.50.0130.0275.83
4.3.40.0230.0335.75
4.3.30.0070.0274.61
4.3.20.0130.0204.51
4.3.10.0130.0204.48
4.3.00.0000.0238.43

preferences:
48.58 ms | 401 KiB | 5 Q