3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decryptData($value){ $key = "ICS2015"; $crypttext = base64_decode($value); $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $crypttext, MCRYPT_MODE_ECB, $iv); return trim($decrypttext); } function encryptData($value) { $key = "ICS2015"; $text = $value; // getting the size of the IV (Initialization Vector) belonging to a specific cipher / mode combination // Accept two params // 1: cipher (MCPYPT_ciphername constraint or the name of algorithms string) // 2: mode (MCPYPT_MODE_modename constraint or one of the following string - ecb, cbc, cfb, ofb, nofb or stream ) $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); // Create an initialization vector(IV) from RANDOM source $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); // Encrypt plaintext with given params $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv); return base64_encode($crypttext); } $data = 'testdata'; $encData = encryptData($data); $decData = decryptData($encData); echo $data; echo $encData; echo $decData; ?>

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.0210.01121.20
8.3.40.0040.01118.97
8.3.30.0140.00718.84
8.3.20.0060.00322.15
8.3.10.0090.00323.55
8.3.00.0050.00323.70
8.2.180.0000.01518.66
8.2.170.0080.01222.96
8.2.160.0170.00020.57
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0080.00020.63
8.2.110.0090.00022.20
8.2.100.0060.00619.51
8.2.90.0000.00817.50
8.2.80.0030.00618.66
8.2.70.0040.00417.50
8.2.60.0000.01117.50
8.2.50.0030.00517.38
8.2.40.0000.00817.75
8.2.30.0000.00817.70
8.2.20.0040.00417.68
8.2.10.0000.01118.06
8.2.00.0040.00417.97
8.1.280.0140.00325.92
8.1.270.0100.00623.91
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0060.00320.43
8.1.230.0040.00717.64
8.1.220.0060.00317.79
8.1.210.0060.00318.77
8.1.200.0110.00017.35
8.1.190.0080.00017.11
8.1.180.0040.00418.10
8.1.170.0060.00317.62
8.1.160.0000.00718.88
8.1.150.0000.00718.75
8.1.140.0000.00919.48
8.1.130.0030.00317.61
8.1.120.0000.00717.42
8.1.110.0030.00517.47
8.1.100.0000.00717.36
8.1.90.0040.00417.38
8.1.80.0040.00417.41
8.1.70.0000.00717.40
8.1.60.0030.00617.58
8.1.50.0030.00617.49
8.1.40.0040.00417.41
8.1.30.0000.00817.66
8.1.20.0030.00617.60
8.1.10.0000.00717.59
8.1.00.0050.00317.45
8.0.300.0060.00318.77
8.0.290.0070.00016.63
8.0.280.0030.00317.95
8.0.270.0030.00317.97
8.0.260.0080.00017.25
8.0.250.0030.00316.95
8.0.240.0000.00816.99
8.0.230.0040.00416.87
8.0.220.0000.00716.86
8.0.210.0040.00416.89
8.0.200.0030.00316.85
8.0.190.0050.00316.96
8.0.180.0000.00716.98
8.0.170.0030.00516.88
8.0.160.0060.00316.95
8.0.150.0030.00516.70
8.0.140.0040.00716.88
8.0.130.0000.00513.30
8.0.120.0050.00316.89
8.0.110.0040.00416.90
8.0.100.0040.00416.95
8.0.90.0030.00516.89
8.0.80.0110.00616.80
8.0.70.0000.00716.70
8.0.60.0030.00516.73
8.0.50.0000.00716.85
8.0.30.0090.00816.97
8.0.20.0090.01217.40
8.0.10.0050.00217.04
8.0.00.0160.01616.78
7.4.330.0020.00216.77
7.4.320.0000.00716.55
7.4.300.0030.00316.54
7.4.290.0030.00316.47
7.4.280.0050.00416.39
7.4.270.0030.00316.61
7.4.260.0000.00716.49
7.4.250.0070.00016.49
7.4.240.0000.00716.49
7.4.230.0040.00416.43
7.4.220.0110.00916.45
7.4.210.0080.00716.68
7.4.200.0000.00816.45
7.4.160.0060.01116.46
7.4.150.0080.00817.40
7.4.140.0130.00817.86
7.4.130.0090.00916.51
7.4.120.0130.00716.49
7.4.110.0070.01116.49
7.4.100.0100.00616.50
7.4.90.0140.00316.67
7.4.80.0100.00719.39
7.4.70.0000.01716.63
7.4.60.0070.01016.45
7.4.50.0030.00716.41
7.4.40.0070.01016.55
7.4.30.0070.01016.59
7.4.00.0050.01015.03
7.3.330.0030.00313.38
7.3.320.0050.00013.39
7.3.310.0000.00716.27
7.3.300.0080.00016.37
7.3.290.0080.00016.26
7.3.280.0080.00716.36
7.3.270.0100.00717.40
7.3.260.0040.01216.36
7.3.250.0110.00716.47
7.3.240.0080.00916.62
7.3.230.0170.00716.59
7.3.210.0140.00316.49
7.3.200.0100.01316.35
7.3.190.0090.00916.37
7.3.180.0100.00616.64
7.3.170.0160.00016.53
7.3.160.0040.01116.58
7.3.120.0130.00314.72
7.3.110.0090.00914.72
7.3.100.0130.00614.93
7.3.90.0130.00014.72
7.3.80.0030.01214.77
7.3.70.0030.00714.75
7.3.60.0070.00714.73
7.3.50.0090.00314.94
7.3.40.0080.00814.66
7.3.30.0000.01014.81
7.3.20.0000.01716.78
7.3.10.0110.00416.45
7.3.00.0030.01016.87
7.2.330.0060.01216.50
7.2.320.0060.01016.31
7.2.310.0090.00916.68
7.2.300.0130.00816.27
7.2.290.0090.01216.18
7.2.250.0040.01414.78
7.2.240.0120.00314.85
7.2.230.0070.00714.96
7.2.220.0060.00915.09
7.2.210.0000.01414.88
7.2.200.0060.00314.94
7.2.190.0030.00714.92
7.2.180.0060.00915.07
7.2.170.0120.00315.00
7.2.160.0040.00814.99
7.2.150.0000.01216.70
7.2.140.0000.01016.91
7.2.130.0000.01416.83
7.2.120.0100.00316.81
7.2.110.0110.00316.57
7.2.100.0060.00616.80
7.2.90.0070.00416.56
7.2.80.0090.00616.88
7.2.70.0000.01216.83
7.2.60.0050.01016.86
7.2.50.0130.00016.70
7.2.40.0110.00616.68
7.2.30.0040.00816.93
7.2.20.0040.01116.55
7.2.10.0070.01016.96
7.2.00.0020.00817.98
7.1.330.0030.01415.39
7.1.320.0080.00615.75
7.1.310.0060.00915.61
7.1.300.0060.00615.46
7.1.290.0090.00015.63
7.1.280.0110.00715.63
7.1.270.0040.00415.71
7.1.260.0030.00915.53
7.1.250.0080.00715.44
7.1.240.0030.00615.71
7.1.230.0040.01115.76
7.1.220.0040.00815.74
7.1.210.0040.00815.73
7.1.200.0070.00615.80
7.1.190.0100.00315.41
7.1.180.0000.01115.82
7.1.170.0030.01015.80
7.1.160.0040.00815.67
7.1.150.0060.00915.83
7.1.140.0000.01515.62
7.1.130.0000.00915.80
7.1.120.0050.00515.49
7.1.110.0100.00715.77
7.1.100.0000.01216.97
7.1.90.0100.00315.71
7.1.80.0030.01015.78
7.1.70.0050.00516.16
7.1.60.0050.01317.35
7.1.50.0090.01116.23
7.1.40.0060.00615.42
7.1.30.0090.00315.72
7.1.20.0030.01015.71
7.1.10.0040.01115.45
7.1.00.0020.04119.09
7.0.330.0000.00815.46
7.0.320.0000.01515.37
7.0.310.0060.00815.35
7.0.300.0040.00415.04
7.0.290.0040.01115.15
7.0.280.0060.00615.07
7.0.270.0040.00415.41
7.0.260.0070.00715.14
7.0.250.0040.01115.50
7.0.240.0030.01015.50
7.0.230.0070.00715.55
7.0.220.0000.01015.30
7.0.210.0070.00715.39
7.0.200.0050.00515.98
7.0.190.0070.00315.38
7.0.180.0070.00715.41
7.0.170.0100.00315.39
7.0.160.0040.00715.16
7.0.150.0060.00615.32
7.0.140.0030.01015.45
7.0.130.0070.00715.38
7.0.120.0060.00315.16
7.0.110.0030.01115.50
7.0.100.0110.00415.45
7.0.90.0070.01015.26
7.0.80.0000.01415.12
7.0.70.0000.01415.36
7.0.60.0070.04517.66
7.0.50.0070.03016.58
7.0.40.0030.03016.89
7.0.30.0170.04316.81
7.0.20.0170.04616.79
7.0.10.0050.03216.95
7.0.00.0120.04316.76
5.6.400.0030.00614.13
5.6.390.0030.00614.48
5.6.380.0070.01014.47
5.6.370.0030.00714.14
5.6.360.0000.00914.39
5.6.350.0060.00714.36
5.6.340.0000.00914.21
5.6.330.0060.00614.23
5.6.320.0070.00713.99
5.6.310.0070.00714.32
5.6.300.0000.00914.47
5.6.290.0030.01014.05
5.6.280.0020.03717.75
5.6.270.0060.00314.22
5.6.260.0030.01414.52
5.6.250.0040.01114.14
5.6.240.0100.00614.11
5.6.230.0070.00314.09
5.6.220.0000.01114.23
5.6.210.0050.04717.55
5.6.200.0110.02016.06
5.6.190.0060.04217.10
5.6.180.0070.03517.38
5.6.170.0180.04017.41
5.6.160.0050.04417.19
5.6.150.0040.02416.14
5.6.140.0020.02416.39
5.6.130.0070.03516.32
5.6.120.0070.02717.62
5.6.110.0140.04317.74
5.6.100.0020.04117.58
5.6.90.0100.04417.63
5.6.80.0090.04117.43
5.6.70.0040.00814.14
5.6.60.0100.00614.24
5.6.50.0000.01414.10
5.6.40.0030.00814.31
5.6.30.0060.00614.02
5.6.20.0100.00614.20
5.6.10.0050.00514.14
5.6.00.0030.01013.94
5.5.380.0060.01014.20
5.5.370.0060.00814.06
5.5.360.0070.01014.13
5.5.350.0160.02817.27
5.5.340.0070.04116.00
5.5.330.0080.03817.05
5.5.320.0270.02217.22
5.5.310.0200.02017.15
5.5.300.0030.03016.21
5.5.290.0090.02716.13
5.5.280.0070.03317.40
5.5.270.0080.03017.56
5.5.260.0070.04517.51
5.5.250.0100.03617.36
5.5.240.0080.02217.25
5.5.230.0100.00613.83
5.5.220.0070.00714.04
5.5.210.0040.01113.76
5.5.200.0000.01414.09
5.5.190.0080.00614.04
5.5.180.0040.00814.13
5.5.170.0030.01213.82
5.5.160.0110.00413.86
5.5.150.0030.01013.91
5.5.140.0060.00613.88
5.5.130.0040.00713.90
5.5.120.0080.00414.25
5.5.110.0040.00814.05
5.5.100.0030.01014.07
5.5.90.0090.00614.04
5.5.80.0030.01014.24
5.5.70.0040.00714.11
5.5.60.0070.01014.16
5.5.50.0080.00814.20
5.5.40.0030.01013.80
5.5.30.0070.00313.82
5.5.20.0110.00414.10
5.5.10.0060.00914.04
5.5.00.0070.00713.88

preferences:
38.28 ms | 401 KiB | 5 Q