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 : " + $data + "\r\n"; echo "$encData : " + $encData + "\r\n"; echo "$decData : " + $decData + "\r\n"; ?>

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.0040.01118.68
8.3.50.0150.00616.33
8.3.40.0100.01018.79
8.3.30.0140.00718.71
8.3.20.0070.00720.25
8.3.10.0030.00523.61
8.3.00.0080.00023.63
8.2.180.0110.00418.38
8.2.170.0150.00622.96
8.2.160.0100.00320.39
8.2.150.0060.00324.18
8.2.140.0000.00924.66
8.2.130.0030.00520.97
8.2.120.0030.00526.35
8.2.110.0030.00620.33
8.2.100.0090.00317.71
8.2.90.0030.00517.75
8.2.80.0040.00418.78
8.2.70.0080.00017.50
8.2.60.0060.00318.04
8.2.50.0060.00318.07
8.2.40.0000.00817.63
8.2.30.0040.00417.61
8.2.20.0040.00417.83
8.2.10.0030.00617.98
8.2.00.0020.00518.05
8.1.280.0150.00325.92
8.1.270.0060.01023.67
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0180.00018.94
8.1.230.0120.00017.77
8.1.220.0000.00817.76
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0050.00517.23
8.1.180.0000.00818.10
8.1.170.0030.00617.62
8.1.160.0050.00218.76
8.1.150.0040.00418.91
8.1.140.0000.00819.44
8.1.130.0030.00317.65
8.1.120.0050.00217.36
8.1.110.0020.00517.31
8.1.100.0050.00217.45
8.1.90.0070.00017.40
8.1.80.0040.00417.41
8.1.70.0040.00417.40
8.1.60.0030.00517.56
8.1.50.0050.00317.51
8.1.40.0080.00017.50
8.1.30.0000.00817.67
8.1.20.0040.00417.66
8.1.10.0050.00317.55
8.1.00.0090.00017.52
8.0.300.0030.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00318.02
8.0.270.0000.00718.07
8.0.260.0050.00517.16
8.0.250.0030.00316.97
8.0.240.0030.00316.86
8.0.230.0000.00717.05
8.0.220.0000.00716.91
8.0.210.0050.00316.88
8.0.200.0000.00717.00
8.0.190.0040.00416.95
8.0.180.0000.00816.90
8.0.170.0050.00316.90
8.0.160.0040.00416.93
8.0.150.0000.00816.82
8.0.140.0100.00016.89
8.0.130.0030.00313.33
8.0.120.0030.00516.88
8.0.110.0030.00516.89
8.0.100.0050.00216.89
8.0.90.0070.00016.74
8.0.80.0070.01016.86
8.0.70.0040.00416.89
8.0.60.0000.00716.89
8.0.50.0040.00416.96
8.0.30.0120.00917.21
8.0.20.0110.00817.40
8.0.10.0070.00017.04
8.0.00.0100.00916.62
7.4.330.0000.00516.87
7.4.320.0000.00716.36
7.4.300.0060.00016.46
7.4.290.0000.00716.51
7.4.280.0040.00616.45
7.4.270.0040.00316.50
7.4.260.0000.00616.62
7.4.250.0030.00316.35
7.4.240.0050.00216.63
7.4.230.0070.00016.60
7.4.220.0090.00916.65
7.4.210.0080.00816.52
7.4.200.0000.00816.68
7.4.160.0060.00916.69
7.4.150.0130.00417.40
7.4.140.0120.00817.86
7.4.130.0100.00816.54
7.4.120.0090.00816.51
7.4.110.0130.01016.45
7.4.100.0100.01316.28
7.4.90.0030.01416.45
7.4.80.0130.00919.39
7.4.70.0060.01616.58
7.4.60.0110.00416.40
7.4.50.0030.01216.50
7.4.40.0080.00816.42
7.4.30.0130.01016.67
7.4.10.0170.00315.16
7.4.00.0070.00915.08
7.3.330.0030.00313.24
7.3.320.0050.00013.36
7.3.310.0000.00716.41
7.3.300.0070.00016.42
7.3.290.0040.00416.25
7.3.280.0060.01216.37
7.3.270.0170.00017.40
7.3.260.0000.01716.22
7.3.250.0090.00916.42
7.3.240.0140.00616.34
7.3.230.0000.01716.39
7.3.210.0130.00316.65
7.3.200.0080.00816.36
7.3.190.0100.00616.64
7.3.180.0060.00916.38
7.3.170.0120.01016.54
7.3.160.0060.00916.37
7.3.130.0060.01214.84
7.3.120.0070.01014.84
7.3.110.0080.01214.61
7.3.100.0070.00714.73
7.3.90.0000.01514.64
7.3.80.0060.00315.03
7.3.70.0030.00914.89
7.3.60.0040.01214.60
7.3.50.0130.00014.90
7.3.40.0030.00814.94
7.3.30.0090.00014.93
7.3.20.0030.01016.72
7.3.10.0030.01316.74
7.3.00.0090.00916.60
7.2.330.0120.00616.66
7.2.320.0100.00716.24
7.2.310.0000.01716.53
7.2.300.0140.01116.42
7.2.290.0150.00316.40
7.2.260.0080.01214.90
7.2.250.0110.00715.07
7.2.240.0080.00614.98
7.2.230.0100.00614.92
7.2.220.0030.00914.98
7.2.210.0100.00315.17
7.2.200.0050.01014.95
7.2.190.0040.01414.70
7.2.180.0080.00615.07
7.2.170.0040.01114.73
7.2.160.0090.00615.06
7.2.150.0130.00716.72
7.2.140.0070.01016.60
7.2.130.0060.00316.71
7.2.120.0040.00716.54
7.2.110.0030.00716.63
7.2.100.0030.01716.43
7.2.90.0080.00816.70
7.2.80.0070.00716.89
7.2.70.0120.00316.85
7.2.60.0060.00816.88
7.2.50.0060.00616.86
7.2.40.0030.01016.61
7.2.30.0060.00816.91
7.2.20.0090.00316.65
7.2.10.0090.00616.61
7.2.00.0030.01117.95
7.1.330.0030.01015.45
7.1.320.0070.01015.64
7.1.310.0000.01315.49
7.1.300.0030.01015.64
7.1.290.0040.00815.35
7.1.280.0090.00315.50
7.1.270.0000.01415.32
7.1.260.0030.01415.37
7.1.250.0030.00815.89
7.1.240.0030.00915.73
7.1.230.0050.00515.41
7.1.220.0070.00715.65
7.1.210.0060.00615.75
7.1.200.0060.00615.75
7.1.190.0060.00915.77
7.1.180.0060.00315.70
7.1.170.0100.00715.70
7.1.160.0070.00715.75
7.1.150.0000.01315.72
7.1.140.0090.00315.77
7.1.130.0060.00915.48
7.1.120.0000.01315.34
7.1.110.0000.01015.61
7.1.100.0090.00717.03
7.1.90.0070.00315.80
7.1.80.0030.00715.86
7.1.70.0030.00716.40
7.1.60.0140.00717.40
7.1.50.0040.01216.22
7.1.40.0110.00415.30
7.1.30.0000.01015.52
7.1.20.0090.00315.64
7.1.10.0070.00715.60
7.1.00.0060.04219.03
7.0.330.0000.01215.38
7.0.320.0070.00715.41
7.0.310.0030.01015.16
7.0.300.0050.00515.46
7.0.290.0080.00615.37
7.0.280.0040.00415.38
7.0.270.0060.00315.37
7.0.260.0000.01315.50
7.0.250.0000.01315.51
7.0.240.0070.00415.38
7.0.230.0040.00815.51
7.0.220.0080.00815.32
7.0.210.0000.01315.46
7.0.200.0070.00315.93
7.0.190.0090.00315.13
7.0.180.0030.01015.44
7.0.170.0030.01215.44
7.0.160.0070.00415.07
7.0.150.0030.01315.31
7.0.140.0090.00615.41
7.0.130.0060.00315.31
7.0.120.0060.00915.55
7.0.110.0000.01215.41
7.0.100.0080.00415.28
7.0.90.0100.00015.52
7.0.80.0060.00615.60
7.0.70.0030.01415.14
7.0.60.0040.04417.60
7.0.50.0060.04416.77
7.0.40.0020.03216.87
7.0.30.0180.03316.81
7.0.20.0220.02816.69
7.0.10.0120.04216.86
7.0.00.0050.02816.86
5.6.400.0070.00313.87
5.6.390.0060.00613.95
5.6.380.0030.00713.85
5.6.370.0000.01214.20
5.6.360.0030.01014.41
5.6.350.0170.00014.05
5.6.340.0000.00914.38
5.6.330.0000.01614.17
5.6.320.0070.00714.36
5.6.310.0090.00613.99
5.6.300.0070.01014.09
5.6.290.0130.00014.31
5.6.280.0090.03117.60
5.6.270.0060.00914.27
5.6.260.0070.00714.15
5.6.250.0000.01214.27
5.6.240.0040.00814.41
5.6.230.0040.00813.96
5.6.220.0130.00514.13
5.6.210.0110.04217.31
5.6.200.0000.04716.23
5.6.190.0050.03417.25
5.6.180.0040.04917.56
5.6.170.0100.03317.25
5.6.160.0070.04517.44
5.6.150.0090.01916.16
5.6.140.0070.02116.25
5.6.130.0090.02816.13
5.6.120.0090.02617.66
5.6.110.0070.04517.54
5.6.100.0060.02617.66
5.6.90.0130.03817.59
5.6.80.0070.04417.20
5.6.70.0040.01113.96
5.6.60.0100.00313.96
5.6.50.0070.00714.04
5.6.40.0000.01314.00
5.6.30.0030.01014.28
5.6.20.0060.00614.01
5.6.10.0060.00614.17
5.6.00.0060.00613.91
5.5.380.0080.01114.14
5.5.370.0120.00614.21
5.5.360.0070.01113.86
5.5.350.0180.03217.14
5.5.340.0020.05015.93
5.5.330.0020.05117.25
5.5.320.0330.03117.23
5.5.310.0220.01817.10
5.5.300.0110.03916.11
5.5.290.0050.02416.09
5.5.280.0070.04717.49
5.5.270.0060.03317.47
5.5.260.0080.04317.37
5.5.250.0120.03817.39
5.5.240.0090.02616.91
5.5.230.0030.00713.98
5.5.220.0070.00713.88
5.5.210.0030.00913.70
5.5.200.0060.00313.70
5.5.190.0060.00614.18
5.5.180.0030.00613.99
5.5.170.0150.00313.67
5.5.160.0040.01113.92
5.5.150.0070.01014.02
5.5.140.0100.00313.91
5.5.130.0030.01013.81
5.5.120.0030.01213.90
5.5.110.0070.00713.83
5.5.100.0100.00314.00
5.5.90.0060.00613.70
5.5.80.0030.01014.03
5.5.70.0080.00413.99
5.5.60.0040.00713.93
5.5.50.0070.00713.71
5.5.40.0000.01413.85
5.5.30.0040.01113.73
5.5.20.0060.00614.25
5.5.10.0080.00614.04
5.5.00.0030.01013.87

preferences:
61.13 ms | 400 KiB | 5 Q