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), $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.0120.00316.63
8.3.50.0240.00721.93
8.3.40.0000.01518.49
8.3.30.0040.01118.79
8.3.20.0060.00320.34
8.3.10.0040.00421.77
8.3.00.0040.00419.38
8.2.180.0110.00418.41
8.2.170.0110.00422.96
8.2.160.0100.00320.27
8.2.150.0050.00324.18
8.2.140.0000.00724.66
8.2.130.0050.00320.53
8.2.120.0000.00726.35
8.2.110.0070.00321.00
8.2.100.0000.01117.78
8.2.90.0040.00417.90
8.2.80.0050.00317.97
8.2.70.0030.00617.48
8.2.60.0030.00518.04
8.2.50.0060.00318.07
8.2.40.0040.00419.46
8.2.30.0030.00320.67
8.2.20.0060.00317.74
8.2.10.0000.00818.05
8.2.00.0080.00018.11
8.1.280.0040.01125.92
8.1.270.0090.01223.83
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0040.00820.68
8.1.230.0080.00320.97
8.1.220.0000.00817.79
8.1.210.0050.00318.85
8.1.200.0000.00917.25
8.1.190.0060.00317.76
8.1.180.0060.00318.10
8.1.170.0030.00718.84
8.1.160.0040.00421.90
8.1.150.0070.00018.81
8.1.140.0040.00419.46
8.1.130.0070.00017.70
8.1.120.0040.00417.42
8.1.110.0030.00517.48
8.1.100.0040.00417.43
8.1.90.0040.00417.34
8.1.80.0080.00017.28
8.1.70.0030.00317.31
8.1.60.0040.00417.67
8.1.50.0000.00917.46
8.1.40.0030.00517.58
8.1.30.0060.00317.68
8.1.20.0000.00717.64
8.1.10.0040.00417.65
8.1.00.0000.00817.52
8.0.300.0040.00419.96
8.0.290.0040.00416.84
8.0.280.0070.00018.37
8.0.270.0000.00717.28
8.0.260.0070.00017.25
8.0.250.0000.00717.06
8.0.240.0030.00316.94
8.0.230.0040.00416.96
8.0.220.0030.00516.94
8.0.210.0000.00716.81
8.0.200.0000.00617.00
8.0.190.0070.00016.91
8.0.180.0050.00216.93
8.0.170.0030.00716.96
8.0.160.0020.00516.93
8.0.150.0050.00216.94
8.0.140.0050.00216.86
8.0.130.0050.00013.30
8.0.120.0090.00016.80
8.0.110.0040.00416.96
8.0.100.0000.00716.78
8.0.90.0040.00416.81
8.0.80.0060.00916.83
8.0.70.0040.00416.82
8.0.60.0040.00416.83
8.0.50.0040.00416.89
8.0.30.0080.01117.08
8.0.20.0130.00817.40
8.0.10.0000.00816.95
8.0.00.0080.01016.89
7.4.330.0000.00516.85
7.4.320.0070.00016.36
7.4.300.0030.00316.46
7.4.290.0030.00316.64
7.4.280.0030.00616.65
7.4.270.0030.00316.52
7.4.260.0060.00016.58
7.4.250.0040.00416.50
7.4.240.0020.00616.49
7.4.230.0030.00316.72
7.4.220.0040.00416.62
7.4.210.0000.01516.49
7.4.200.0000.00716.46
7.4.160.0070.01116.43
7.4.150.0140.00317.40
7.4.140.0090.01117.86
7.4.130.0090.01116.74
7.4.120.0080.00916.50
7.4.110.0070.01116.51
7.4.100.0120.01216.44
7.4.90.0070.01016.54
7.4.80.0030.01319.39
7.4.70.0060.01016.56
7.4.60.0040.01216.60
7.4.50.0070.00716.45
7.4.40.0100.01316.27
7.4.30.0120.00616.69
7.4.00.0040.01415.01
7.3.330.0000.00513.23
7.3.320.0000.00513.35
7.3.310.0040.00216.29
7.3.300.0030.00316.31
7.3.290.0060.01116.39
7.3.280.0060.01016.38
7.3.270.0140.00317.40
7.3.260.0200.00316.41
7.3.250.0120.00816.35
7.3.240.0100.00716.44
7.3.230.0100.00716.39
7.3.210.0110.00816.35
7.3.200.0120.00916.45
7.3.190.0100.00716.33
7.3.180.0060.01516.61
7.3.170.0130.00716.42
7.3.160.0130.00316.27
7.3.120.0080.00414.87
7.3.110.0030.01214.84
7.3.100.0100.00714.64
7.3.90.0040.01114.84
7.3.80.0110.00614.85
7.3.70.0080.00414.71
7.3.60.0030.00814.90
7.3.50.0040.00814.77
7.3.40.0070.00714.89
7.3.30.0080.00514.86
7.3.20.0030.00916.57
7.3.10.0000.01116.60
7.3.00.0030.01016.66
7.2.330.0070.01116.36
7.2.320.0070.01016.43
7.2.310.0070.01016.61
7.2.300.0130.01016.43
7.2.290.0140.00716.66
7.2.240.0000.00914.74
7.2.230.0000.01214.84
7.2.220.0070.00715.13
7.2.210.0030.01015.22
7.2.200.0000.01214.80
7.2.190.0070.00714.80
7.2.180.0060.00914.91
7.2.170.0060.00915.12
7.2.160.0120.00614.91
7.2.150.0040.01116.84
7.2.140.0090.00616.98
7.2.130.0070.00717.00
7.2.120.0130.00316.92
7.2.110.0090.00316.62
7.2.100.0130.00316.86
7.2.90.0070.00716.86
7.2.80.0110.00716.85
7.2.70.0000.01716.87
7.2.60.0060.01116.85
7.2.50.0040.00816.81
7.2.40.0060.00916.86
7.2.30.0060.01216.95
7.2.20.0070.01016.85
7.2.10.0110.00416.61
7.2.00.0020.01318.04
7.1.330.0090.00615.81
7.1.320.0070.00715.36
7.1.310.0030.00615.65
7.1.300.0070.01015.81
7.1.290.0100.00615.80
7.1.280.0110.00415.76
7.1.270.0060.00915.71
7.1.260.0070.00715.88
7.1.250.0080.00615.59
7.1.200.0040.00815.85
7.1.100.0030.01018.04
7.1.70.0130.01017.31
7.1.60.0060.01919.36
7.1.50.0030.01016.83
7.1.00.0000.08022.51
7.0.200.0000.00916.88
7.0.60.0070.08719.91
7.0.50.0070.05018.07
7.0.40.0100.08020.32
7.0.30.0400.04020.16
7.0.20.0270.07720.30
7.0.10.0030.04320.24
7.0.00.0070.06020.14
5.6.280.0100.05321.02
5.6.210.0030.04320.72
5.6.200.0070.07718.29
5.6.190.0070.06020.49
5.6.180.0400.06320.51
5.6.170.0200.08320.49
5.6.160.0070.09320.62
5.6.150.0070.04018.20
5.6.140.0030.04018.27
5.6.130.0070.08318.33
5.6.120.0030.04720.99
5.6.110.0100.07721.09
5.6.100.0130.08021.12
5.6.90.0030.07321.06
5.6.80.0130.05720.53
5.5.350.0200.07720.33
5.5.340.0000.04018.16
5.5.330.0070.05020.30
5.5.320.0030.05720.30
5.5.310.0100.04720.36
5.5.300.0030.04018.01
5.5.290.0100.07718.00
5.5.280.0100.04320.92
5.5.270.0030.07720.88
5.5.260.0030.06020.92
5.5.250.0130.08320.77
5.5.240.0130.03020.34

preferences:
66.92 ms | 401 KiB | 5 Q