3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Encryption { public function decrypt($string) { $output = false; $key = 'myKey';//must be same as of encryption // initialization vector $iv = md5(md5($key)); $output = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, $iv); print_r($output); $output = str_replace('\0', '', addslashes(rtrim($output, ""))); return $output; } public function encrypt($string) { $output = false; $key = 'myKey'; // initialization vector $iv = md5(md5($key)); $output = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, $iv); $output = base64_encode($output); return $output; } public function encryptData($input) { $output = trim(base64_encode(base64_encode($input)), '=='); $output = $this->encrypt($input); return $output; } public function decryptData($input) { $output = base64_decode(base64_decode($input)); $output = $this->decrypt($input); return $output; } } $test = new Encryption(); echo $test->encryptData("Narendra")."\n"; echo $test->decryptData("Narendra");

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.0090.00616.75
8.3.50.0040.01118.30
8.3.40.0090.00918.62
8.3.30.0110.00418.75
8.3.20.0030.00520.33
8.3.10.0060.00321.86
8.3.00.0040.00419.26
8.2.180.0040.01118.66
8.2.170.0140.00022.96
8.2.160.0070.01020.50
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00420.35
8.2.120.0030.00626.35
8.2.110.0060.00321.12
8.2.100.0080.00419.40
8.2.90.0030.00520.95
8.2.80.0030.00517.97
8.2.70.0000.00917.49
8.2.60.0080.00017.68
8.2.50.0030.00518.07
8.2.40.0050.00319.39
8.2.30.0040.00420.53
8.2.20.0030.00517.73
8.2.10.0040.00417.97
8.2.00.0000.00718.02
8.1.280.0030.01425.92
8.1.270.0160.00423.90
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0000.01019.21
8.1.230.0110.00018.86
8.1.220.0030.00517.76
8.1.210.0000.00818.77
8.1.200.0000.00917.36
8.1.190.0060.00317.76
8.1.180.0030.00618.10
8.1.170.0060.00318.43
8.1.160.0030.00521.90
8.1.150.0000.00818.77
8.1.140.0040.00419.54
8.1.130.0030.00317.64
8.1.120.0040.00417.36
8.1.110.0040.00417.45
8.1.100.0030.00717.47
8.1.90.0040.00417.38
8.1.80.0000.00717.36
8.1.70.0070.00017.41
8.1.60.0000.00717.46
8.1.50.0030.00517.63
8.1.40.0070.00017.59
8.1.30.0080.00017.66
8.1.20.0040.00417.54
8.1.10.0040.00417.65
8.1.00.0040.00417.56
8.0.300.0060.00318.77
8.0.290.0050.00216.88
8.0.280.0000.00718.49
8.0.270.0000.00817.23
8.0.260.0040.00417.29
8.0.250.0070.00016.87
8.0.240.0030.00316.98
8.0.230.0030.00316.93
8.0.220.0030.00516.90
8.0.210.0000.00716.90
8.0.200.0000.00716.92
8.0.190.0050.00516.99
8.0.180.0080.00016.95
8.0.170.0050.00216.85
8.0.160.0000.00716.98
8.0.150.0070.00016.93
8.0.140.0000.00816.88
8.0.130.0060.00013.44
8.0.120.0050.00316.89
8.0.110.0040.00416.86
8.0.100.0050.00316.94
8.0.90.0000.00716.93
8.0.80.0030.01816.90
8.0.70.0030.00516.79
8.0.60.0000.00716.94
8.0.50.0040.00416.73
8.0.30.0100.00817.09
8.0.20.0120.00817.40
8.0.10.0070.00017.17
8.0.00.0060.01316.82
7.4.330.0000.00516.80
7.4.320.0060.00016.56
7.4.300.0000.00616.60
7.4.290.0030.00316.64
7.4.280.0030.00616.60
7.4.270.0000.00716.65
7.4.260.0080.00016.63
7.4.250.0000.00816.61
7.4.240.0050.00216.52
7.4.230.0000.00716.67
7.4.220.0090.00916.40
7.4.210.0180.00316.67
7.4.200.0040.00416.63
7.4.160.0130.00316.59
7.4.150.0090.00917.40
7.4.140.0090.01117.86
7.4.130.0100.00816.58
7.4.120.0070.01216.67
7.4.110.0060.01116.67
7.4.100.0130.01016.76
7.4.90.0120.00616.54
7.4.80.0150.00719.39
7.4.70.0190.00316.51
7.4.60.0060.01016.42
7.4.50.0090.00416.44
7.4.40.0120.00616.55
7.4.30.0110.00716.42
7.4.00.0060.01014.92
7.3.330.0030.00313.43
7.3.320.0050.00013.43
7.3.310.0030.00316.23
7.3.300.0030.00316.36
7.3.290.0060.01016.38
7.3.280.0060.01116.39
7.3.270.0150.00417.40
7.3.260.0060.01016.66
7.3.250.0110.00816.45
7.3.240.0090.00916.37
7.3.230.0130.00716.41
7.3.210.0100.00716.50
7.3.200.0080.00816.57
7.3.190.0090.01216.25
7.3.180.0100.01416.38
7.3.170.0100.01316.59
7.3.160.0040.01216.48
7.2.330.0150.00716.66
7.2.320.0070.01016.62
7.2.310.0000.02216.68
7.2.300.0060.01116.78
7.2.290.0100.01316.63
7.2.60.0070.00717.03
7.2.00.0040.00819.44
7.1.200.0230.00715.63
7.1.100.0000.01118.01
7.1.70.0120.01517.13
7.1.60.0030.02219.36
7.1.50.0040.01116.80
7.1.00.0030.07722.37
7.0.200.0000.01016.43
7.0.60.0230.07320.05
7.0.50.0130.07718.20
7.0.40.0030.04320.13
7.0.30.0400.04320.13
7.0.20.0230.05020.14
7.0.10.0170.05720.33
7.0.00.0070.09020.30
5.6.280.0030.06721.00
5.6.210.0100.07720.71
5.6.200.0070.05018.29
5.6.190.0100.07320.65
5.6.180.0400.04020.51
5.6.170.0200.08720.54
5.6.160.0030.05720.54
5.6.150.0030.04718.20
5.6.140.0000.04318.17
5.6.130.0030.04318.23
5.6.120.0030.06021.17
5.6.110.0070.06321.11
5.6.100.0100.06721.13
5.6.90.0200.07021.05
5.6.80.0070.05320.62
5.5.350.0130.07320.42
5.5.340.0000.04318.03
5.5.330.0000.04720.45
5.5.320.0100.06720.37
5.5.310.0070.05320.41
5.5.300.0070.04017.97
5.5.290.0030.04017.99
5.5.280.0070.04320.94
5.5.270.0130.04020.88
5.5.260.0070.05320.90
5.5.250.0070.05320.77
5.5.240.0200.03020.31

preferences:
64.73 ms | 400 KiB | 5 Q