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 = 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.70.0040.01116.63
8.3.60.0120.00316.88
8.3.50.0190.01021.99
8.3.40.0150.00318.73
8.3.30.0070.00718.67
8.3.20.0050.00220.18
8.3.10.0040.00421.73
8.3.00.0040.00419.38
8.2.180.0100.01318.28
8.2.170.0080.00622.96
8.2.160.0120.00320.37
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0090.00020.47
8.2.120.0080.00026.35
8.2.110.0030.00620.58
8.2.100.0040.00817.76
8.2.90.0030.00518.22
8.2.80.0040.00417.97
8.2.70.0040.00417.48
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0040.00419.28
8.2.30.0000.00720.58
8.2.20.0060.00317.78
8.2.10.0040.00418.13
8.2.00.0020.00518.01
8.1.280.0110.00725.92
8.1.270.0070.01023.91
8.1.260.0030.00628.09
8.1.250.0080.00028.09
8.1.240.0040.00422.04
8.1.230.0040.00720.90
8.1.220.0060.00317.79
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0050.00317.59
8.1.180.0080.00018.10
8.1.170.0080.00018.75
8.1.160.0020.00521.94
8.1.150.0000.00718.79
8.1.140.0000.00819.46
8.1.130.0000.00717.64
8.1.120.0040.00417.45
8.1.110.0000.00817.41
8.1.100.0040.00717.45
8.1.90.0030.00517.36
8.1.80.0040.00417.50
8.1.70.0000.00717.32
8.1.60.0040.00417.51
8.1.50.0040.00417.56
8.1.40.0030.00617.59
8.1.30.0000.00817.74
8.1.20.0040.00417.54
8.1.10.0000.00717.61
8.1.00.0030.00617.57
8.0.300.0000.00720.21
8.0.290.0040.00416.75
8.0.280.0070.00018.34
8.0.270.0030.00317.13
8.0.260.0000.00717.16
8.0.250.0030.00317.03
8.0.240.0000.00716.93
8.0.230.0040.00416.87
8.0.220.0030.00316.95
8.0.210.0000.00716.96
8.0.200.0030.00316.91
8.0.190.0000.00817.04
8.0.180.0000.00716.97
8.0.170.0040.00416.97
8.0.160.0030.00516.93
8.0.150.0040.00416.83
8.0.140.0040.00416.80
8.0.130.0030.00313.39
8.0.120.0080.00016.80
8.0.110.0040.00416.93
8.0.100.0000.00716.94
8.0.90.0000.00716.80
8.0.80.0100.01016.94
8.0.70.0040.00416.82
8.0.60.0040.00416.91
8.0.50.0080.00016.77
8.0.30.0100.01317.37
8.0.20.0100.01017.40
8.0.10.0040.00416.92
8.0.00.0110.00716.82
7.4.330.0050.00016.67
7.4.320.0060.00016.54
7.4.300.0060.00016.63
7.4.290.0000.00716.65
7.4.280.0030.00616.63
7.4.270.0000.00816.65
7.4.260.0040.00416.64
7.4.250.0000.00716.49
7.4.240.0020.00616.62
7.4.230.0030.00316.62
7.4.220.0100.01316.50
7.4.210.0070.00716.76
7.4.200.0030.00316.38
7.4.160.0060.00916.44
7.4.150.0120.00617.40
7.4.140.0070.01117.86
7.4.130.0070.01316.59
7.4.120.0100.01016.54
7.4.110.0090.00916.74
7.4.100.0100.00916.70
7.4.90.0110.00716.72
7.4.80.0090.01019.39
7.4.70.0000.01616.64
7.4.60.0030.01316.57
7.4.50.0040.01116.61
7.4.40.0140.00316.59
7.4.30.0030.01416.46
7.4.10.0110.00315.02
7.4.00.0070.00814.93
7.3.330.0000.00513.47
7.3.320.0030.00313.40
7.3.310.0030.00316.46
7.3.300.0040.00416.50
7.3.290.0070.00916.36
7.3.280.0090.00716.42
7.3.270.0100.00717.40
7.3.260.0070.01116.39
7.3.250.0090.01016.43
7.3.240.0090.01116.36
7.3.230.0140.00616.64
7.3.210.0030.01416.41
7.3.200.0030.01216.41
7.3.190.0130.00316.61
7.3.180.0060.01916.46
7.3.170.0090.01216.55
7.3.160.0160.00016.59
7.3.130.0000.01914.81
7.3.120.0040.01414.95
7.3.110.0060.01114.98
7.3.100.0040.00714.88
7.3.90.0030.01314.67
7.3.80.0040.00714.88
7.3.70.0070.00714.87
7.3.60.0060.00614.73
7.3.50.0060.00614.61
7.3.40.0040.00814.75
7.3.30.0080.00814.72
7.3.20.0080.00616.50
7.3.10.0120.00816.33
7.3.00.0130.00616.37
7.2.330.0140.00316.64
7.2.320.0130.00416.73
7.2.310.0060.01216.66
7.2.300.0120.00616.66
7.2.290.0070.01116.70
7.2.260.0100.00715.06
7.2.250.0030.01314.77
7.2.240.0070.00615.13
7.2.230.0060.00314.85
7.2.220.0060.00614.93
7.2.210.0030.01015.15
7.2.200.0100.00714.91
7.2.190.0080.00414.97
7.2.180.0060.00615.05
7.2.170.0070.00714.79
7.2.160.0090.00615.04
7.2.150.0100.00316.86
7.2.140.0070.00716.72
7.2.130.0100.01016.60
7.2.120.0110.00616.37
7.2.110.0090.00716.54
7.2.100.0110.00516.25
7.2.90.0060.01016.56
7.2.80.0090.00816.51
7.2.70.0090.00516.86
7.2.60.0080.00716.44
7.2.50.0090.00616.73
7.2.40.0060.00916.57
7.2.30.0130.00516.45
7.2.20.0140.00416.59
7.2.10.0100.00316.63
7.2.00.0020.01217.64
7.1.330.0100.00615.80
7.1.320.0030.01315.80
7.1.310.0080.00415.77
7.1.300.0030.00715.88
7.1.290.0030.00915.85
7.1.280.0120.00315.70
7.1.270.0030.00515.93
7.1.260.0000.01515.66
7.1.250.0100.00315.38
7.1.240.0070.00715.88
7.1.230.0090.00315.49
7.1.220.0080.00315.77
7.1.210.0000.01115.89
7.1.200.0050.00815.75
7.1.190.0030.00715.57
7.1.180.0000.01315.81
7.1.170.0040.00415.78
7.1.160.0040.00815.75
7.1.150.0030.00915.59
7.1.140.0000.00915.40
7.1.130.0070.00715.77
7.1.120.0100.00315.77
7.1.110.0000.01015.80
7.1.100.0030.01016.93
7.1.90.0060.00315.93
7.1.80.0090.00615.86
7.1.70.0070.00716.45
7.1.60.0080.01017.56
7.1.50.0080.00616.29
7.1.40.0040.00715.47
7.1.30.0030.01015.57
7.1.20.0060.00315.82
7.1.10.0040.00415.46
7.1.00.0050.04119.02
7.0.330.0030.01015.15
7.0.320.0040.00715.13
7.0.310.0000.00815.56
7.0.300.0050.00415.51
7.0.290.0100.00315.41
7.0.280.0070.01015.39
7.0.270.0100.00315.39
7.0.260.0040.00815.41
7.0.250.0000.00915.46
7.0.240.0110.00315.62
7.0.230.0050.00315.47
7.0.220.0060.00615.38
7.0.210.0150.00015.45
7.0.200.0030.01016.01
7.0.190.0080.00415.32
7.0.180.0090.00315.43
7.0.170.0060.00615.38
7.0.160.0030.00915.55
7.0.150.0000.00815.50
7.0.140.0130.00015.39
7.0.130.0040.00415.22
7.0.120.0000.01415.55
7.0.110.0110.00015.16
7.0.100.0070.00715.54
7.0.90.0040.01115.25
7.0.80.0000.00815.44
7.0.70.0070.00715.31
7.0.60.0110.04117.63
7.0.50.0070.04116.87
7.0.40.0050.02616.89
7.0.30.0230.02516.79
7.0.20.0150.04016.88
7.0.10.0040.02716.77
7.0.00.0050.04616.77
5.6.400.0070.01014.51
5.6.390.0070.01014.45
5.6.380.0070.00714.32
5.6.370.0090.00914.31
5.6.360.0070.00314.29
5.6.350.0070.00714.29
5.6.340.0070.01014.59
5.6.330.0100.00014.39
5.6.320.0030.01214.54
5.6.310.0000.01314.49
5.6.300.0040.00814.47
5.6.290.0090.00613.98
5.6.280.0030.02717.65
5.6.270.0060.00314.29
5.6.260.0040.00414.38
5.6.250.0000.00814.08
5.6.240.0000.01414.42
5.6.230.0120.00314.50
5.6.220.0000.01514.30
5.6.210.0100.04317.39
5.6.200.0080.03316.22
5.6.190.0070.03817.61
5.6.180.0400.03017.34
5.6.170.0130.02917.27
5.6.160.0090.04617.36
5.6.150.0140.03716.19
5.6.140.0180.01616.32
5.6.130.0090.03016.27
5.6.120.0060.04817.67
5.6.110.0090.04417.66
5.6.100.0080.02817.71
5.6.90.0030.04517.51
5.6.80.0030.03617.36
5.6.70.0030.01014.23
5.6.60.0090.00614.23
5.6.50.0090.00614.25
5.6.40.0000.01814.04
5.6.30.0030.01014.27
5.6.20.0060.00614.34
5.6.10.0000.01214.19
5.6.00.0000.00914.28
5.5.380.0060.00614.19
5.5.370.0100.01014.25
5.5.360.0090.00914.34
5.5.350.0170.03717.29
5.5.340.0000.02816.23
5.5.330.0030.02617.35
5.5.320.0100.04017.30
5.5.310.0070.02817.20
5.5.300.0080.03916.14
5.5.290.0090.02216.06
5.5.280.0050.04817.51
5.5.270.0030.02317.57
5.5.260.0040.04817.48
5.5.250.0100.03117.64
5.5.240.0120.03217.10
5.5.230.0030.01214.32
5.5.220.0070.00713.96
5.5.210.0090.00414.01
5.5.200.0090.00614.11
5.5.190.0120.00614.35
5.5.180.0030.00614.07
5.5.170.0060.00614.24
5.5.160.0040.01114.42
5.5.150.0060.00914.14
5.5.140.0040.01114.25
5.5.130.0030.00514.07
5.5.120.0040.01114.16
5.5.110.0060.00614.17
5.5.100.0030.01414.04
5.5.90.0070.00714.20
5.5.80.0000.01414.09
5.5.70.0070.00714.22
5.5.60.0070.00414.08
5.5.50.0040.01114.32
5.5.40.0030.00614.00
5.5.30.0000.00814.24
5.5.20.0070.00714.29
5.5.10.0150.00013.92
5.5.00.0060.00614.16

preferences:
86.05 ms | 401 KiB | 5 Q