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); $output = base64_encode($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.38
8.3.50.0150.01222.11
8.3.40.0070.01118.84
8.3.30.0110.00418.53
8.3.20.0030.00620.09
8.3.10.0040.00421.74
8.3.00.0050.00319.38
8.2.180.0070.00718.66
8.2.170.0110.00418.88
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0030.00620.35
8.2.120.0080.00026.35
8.2.110.0030.00621.07
8.2.100.0120.00017.71
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0080.00017.47
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0000.00919.52
8.2.30.0030.00520.50
8.2.20.0060.00317.56
8.2.10.0040.00418.11
8.2.00.0070.00017.96
8.1.280.0070.01025.92
8.1.270.0090.00623.90
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0070.00419.29
8.1.230.0110.00020.94
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0000.00917.34
8.1.190.0060.00317.64
8.1.180.0000.00918.10
8.1.170.0030.00518.43
8.1.160.0040.00421.96
8.1.150.0000.00718.84
8.1.140.0050.00319.58
8.1.130.0030.00317.58
8.1.120.0040.00417.31
8.1.110.0070.00017.39
8.1.100.0060.00317.39
8.1.90.0000.00817.42
8.1.80.0000.00717.33
8.1.70.0000.00717.30
8.1.60.0060.00317.48
8.1.50.0070.00017.42
8.1.40.0030.00517.46
8.1.30.0030.00617.70
8.1.20.0040.00417.59
8.1.10.0040.00417.63
8.1.00.0030.00517.34
8.0.300.0000.00918.77
8.0.290.0070.00016.75
8.0.280.0040.00418.30
8.0.270.0040.00417.10
8.0.260.0040.00417.12
8.0.250.0000.00717.00
8.0.240.0030.00316.89
8.0.230.0070.00016.96
8.0.220.0040.00416.87
8.0.210.0070.00016.89
8.0.200.0000.00616.91
8.0.190.0040.00416.95
8.0.180.0040.00416.81
8.0.170.0080.00016.97
8.0.160.0070.00016.86
8.0.150.0000.00816.76
8.0.140.0070.00016.84
8.0.130.0050.00013.27
8.0.120.0040.00416.86
8.0.110.0040.00416.89
8.0.100.0000.00816.78
8.0.90.0040.00416.77
8.0.80.0090.00616.95
8.0.70.0080.00016.75
8.0.60.0000.00816.86
8.0.50.0000.00716.89
8.0.30.0110.00616.98
8.0.20.0110.01217.41
8.0.10.0000.00816.87
8.0.00.0080.01216.72
7.4.330.0000.00616.66
7.4.320.0000.00616.42
7.4.300.0060.00016.56
7.4.290.0070.00016.52
7.4.280.0000.00916.43
7.4.270.0020.00516.58
7.4.260.0000.00816.58
7.4.250.0030.00516.57
7.4.240.0040.00416.49
7.4.230.0030.00316.50
7.4.220.0110.00716.60
7.4.210.0110.00316.45
7.4.200.0000.00716.60
7.4.160.0090.00616.48
7.4.150.0060.01317.40
7.4.140.0110.00817.86
7.4.130.0100.01116.50
7.4.120.0060.01116.50
7.4.110.0130.00716.57
7.4.100.0090.00916.45
7.4.90.0090.00916.56
7.4.80.0070.01119.39
7.4.70.0130.01016.61
7.4.60.0100.00716.59
7.4.50.0080.00516.36
7.4.40.0090.00616.27
7.4.30.0150.00816.70
7.4.10.0030.00914.79
7.4.00.0060.00615.01
7.3.330.0050.00013.37
7.3.320.0000.00513.34
7.3.310.0050.00216.19
7.3.300.0030.00316.32
7.3.290.0040.01016.33
7.3.280.0050.01016.38
7.3.270.0050.01417.40
7.3.260.0070.01016.64
7.3.250.0110.00716.35
7.3.240.0110.00616.35
7.3.230.0090.01016.39
7.3.210.0100.00616.38
7.3.200.0090.00616.25
7.3.190.0000.01716.54
7.3.180.0110.00916.55
7.3.170.0100.00716.34
7.3.160.0030.01316.37
7.3.130.0040.00714.68
7.3.120.0070.00314.86
7.3.110.0030.00714.70
7.3.100.0000.00914.94
7.3.90.0000.01014.75
7.3.80.0070.00714.82
7.3.70.0060.00314.85
7.3.60.0040.00814.80
7.3.50.0060.00314.84
7.3.40.0040.00814.64
7.3.30.0000.01414.80
7.3.20.0060.00616.66
7.3.10.0040.00716.57
7.3.00.0030.00916.47
7.2.330.0000.01716.58
7.2.320.0100.01316.41
7.2.310.0100.01316.37
7.2.300.0140.01116.29
7.2.290.0030.01516.36
7.2.260.0070.00414.88
7.2.250.0040.00715.15
7.2.240.0030.01015.17
7.2.230.0030.00614.88
7.2.220.0030.01014.87
7.2.210.0080.00014.86
7.2.200.0080.00414.93
7.2.190.0040.01215.09
7.2.180.0060.00315.11
7.2.170.0060.00715.13
7.2.160.0070.00414.80
7.2.150.0060.00616.89
7.2.140.0070.00716.67
7.2.130.0060.00616.87
7.2.120.0020.00716.69
7.2.110.0060.00816.80
7.2.100.0090.00216.86
7.2.90.0060.00816.95
7.2.80.0000.01216.93
7.2.70.0050.00716.70
7.2.60.0090.00316.74
7.2.50.0040.00616.80
7.2.40.0070.00516.94
7.2.30.0050.01216.99
7.2.20.0070.00516.66
7.2.10.0040.01116.80
7.2.00.0050.00817.63
7.1.330.0000.00915.81
7.1.320.0030.00715.95
7.1.310.0070.00315.61
7.1.300.0060.00615.85
7.1.290.0000.01215.85
7.1.280.0090.00315.82
7.1.270.0080.00615.59
7.1.260.0040.00415.72
7.1.250.0030.01015.70
7.1.240.0010.00815.67
7.1.230.0050.00715.72
7.1.220.0060.00715.67
7.1.210.0060.00415.52
7.1.200.0040.00715.73
7.1.190.0030.00915.74
7.1.180.0020.00915.80
7.1.170.0070.00615.78
7.1.160.0040.00715.66
7.1.150.0030.01015.83
7.1.140.0050.00715.68
7.1.130.0060.00415.53
7.1.120.0050.00915.80
7.1.110.0050.00615.83
7.1.100.0040.00816.64
7.1.90.0020.00815.81
7.1.80.0060.00615.73
7.1.70.0130.00416.19
7.1.60.0080.00916.90
7.1.50.0080.00716.13
7.1.40.0080.01015.80
7.1.30.0060.00515.80
7.1.20.0070.00715.83
7.1.10.0070.00715.73
7.1.00.0040.03118.01
7.0.330.0080.00515.36
7.0.320.0090.00515.42
7.0.310.0050.00515.44
7.0.300.0050.00815.19
7.0.290.0030.00715.19
7.0.280.0070.00515.38
7.0.270.0040.00515.28
7.0.260.0030.00915.46
7.0.250.0060.00615.56
7.0.240.0050.00615.45
7.0.230.0090.00415.33
7.0.220.0060.00815.29
7.0.210.0080.00615.23
7.0.200.0040.00915.85
7.0.190.0070.00715.44
7.0.180.0110.00315.34
7.0.170.0030.01115.38
7.0.160.0030.00915.32
7.0.150.0050.00915.43
7.0.140.0020.01115.23
7.0.130.0080.00515.15
7.0.120.0080.00515.44
7.0.110.0060.00615.41
7.0.100.0040.00815.43
7.0.90.0080.00815.43
7.0.80.0070.00715.21
7.0.70.0060.00815.43
7.0.60.0070.02916.92
7.0.50.0090.02816.26
7.0.40.0040.02215.69
7.0.30.0120.03415.55
7.0.20.0180.02915.67
7.0.10.0100.02115.63
7.0.00.0050.01815.77
5.6.400.0090.00614.36
5.6.390.0000.01414.26
5.6.380.0080.00714.32
5.6.370.0030.00814.47
5.6.360.0060.00514.53
5.6.350.0020.01114.11
5.6.340.0050.01114.43
5.6.330.0070.00514.32
5.6.320.0060.00614.27
5.6.310.0060.00514.38
5.6.300.0040.00714.20
5.6.290.0020.00714.41
5.6.280.0050.03016.43
5.6.270.0080.00314.25
5.6.260.0090.00514.15
5.6.250.0040.01114.47
5.6.240.0050.00814.26
5.6.230.0060.00614.34
5.6.220.0060.00614.20
5.6.210.0100.02916.38
5.6.200.0090.01915.46
5.6.190.0060.03616.33
5.6.180.0200.02216.42
5.6.170.0130.02716.38
5.6.160.0070.03416.46
5.6.150.0050.03215.65
5.6.140.0060.01615.65
5.6.130.0050.02415.47
5.6.120.0070.03216.56
5.6.110.0100.03116.58
5.6.100.0050.03216.67
5.6.90.0090.02916.55
5.6.80.0050.02716.36
5.6.70.0040.00514.15
5.6.60.0030.00714.07
5.6.50.0020.01414.14
5.6.40.0050.00914.18
5.6.30.0070.00414.38
5.6.20.0020.01214.07
5.6.10.0070.00514.06
5.6.00.0070.00714.09
5.5.380.0040.00812.64
5.5.370.0000.00912.60
5.5.360.0050.00612.97
5.5.350.0120.02415.29
5.5.340.0020.01914.35
5.5.330.0050.02615.08
5.5.320.0170.02515.27
5.5.310.0090.01815.06
5.5.300.0040.01914.47
5.5.290.0050.01814.46
5.5.280.0110.03015.40
5.5.270.0080.01515.39
5.5.260.0140.02415.29
5.5.250.0040.03015.24
5.5.240.0100.01415.12
5.5.230.0060.00412.68
5.5.220.0050.00712.54
5.5.210.0050.00412.38
5.5.200.0030.00612.46
5.5.190.0070.00412.75
5.5.180.0050.00312.70
5.5.170.0050.00412.65
5.5.160.0040.01012.64
5.5.150.0020.00912.38
5.5.140.0050.00812.54
5.5.130.0090.00412.67
5.5.120.0040.00712.49
5.5.110.0020.00812.74
5.5.100.0030.00612.48
5.5.90.0050.00912.56
5.5.80.0020.01112.72
5.5.70.0020.01012.55
5.5.60.0070.00712.52
5.5.50.0060.00612.42
5.5.40.0050.00412.52
5.5.30.0040.00912.56
5.5.20.0060.00512.83
5.5.10.0020.01012.55
5.5.00.0050.00612.68

preferences:
60.29 ms | 401 KiB | 5 Q