3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo openssl_cipher_iv_length('aes-256-gcm'); //echo $key = openssl_random_pseudo_bytes(16); $secret="This is a secret message."; $key=pack("H*", "d8b163deda806acaede2f807"); //echo $iv=openssl_random_pseudo_bytes(12); $iv = "0e42519c0eda67c22c52b605ff41fde395880ebf6ed40a560b5f5ecc8183d26a"; $method="aes-256-gcm"; $encrypted = "95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7"; //$encrypted=openssl_encrypt($secret,$method,$key,false,$iv); $decrypted=openssl_decrypt($encrypted,$method,$key,false,$iv); echo $encrypted; echo "<br>"; echo $decrypted;

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.40.0130.00318.78
8.3.30.0000.01418.84
8.3.20.0030.00620.21
8.3.10.0000.00823.47
8.3.00.0000.01022.37
8.2.170.0140.00422.96
8.2.160.0030.01022.12
8.2.150.0030.00624.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00817.63
8.2.110.0000.00921.03
8.2.100.0040.00817.63
8.2.90.0030.00518.80
8.2.80.0030.00517.97
8.2.70.0030.00517.50
8.2.60.0060.00317.91
8.2.50.0030.00518.07
8.2.40.0000.00821.15
8.2.30.0040.00419.66
8.2.20.0040.00417.77
8.2.10.0040.00418.05
8.2.00.0000.00918.05
8.1.270.0000.00820.07
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0030.00620.86
8.1.230.0060.00617.66
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0030.00518.10
8.1.170.0080.00018.54
8.1.160.0040.00421.82
8.1.150.0070.00018.73
8.1.140.0070.00017.29
8.1.130.0080.00017.64
8.1.120.0000.00717.35
8.1.110.0000.00817.41
8.1.100.0070.00017.31
8.1.90.0000.00717.29
8.1.80.0000.00717.29
8.1.70.0040.00417.41
8.1.60.0060.00317.38
8.1.50.0000.01017.45
8.1.40.0040.00417.41
8.1.30.0090.00017.56
8.1.20.0080.00017.64
8.1.10.0030.00517.59
8.1.00.0040.00417.55
8.0.300.0030.00618.77
8.0.290.0000.00816.75
8.0.280.0000.00718.38
8.0.270.0030.00317.19
8.0.260.0000.00617.20
8.0.250.0040.00416.94
8.0.240.0000.00816.82
8.0.230.0060.00316.93
8.0.220.0070.00016.88
8.0.210.0000.00716.91
8.0.200.0030.00316.96
8.0.190.0030.00616.84
8.0.180.0000.00716.93
8.0.170.0080.00016.90
8.0.160.0050.00216.87
8.0.150.0030.00316.81
8.0.140.0030.00316.78
8.0.130.0000.00913.33
8.0.120.0030.00516.86
8.0.110.0030.00516.86
8.0.100.0050.00316.74
8.0.90.0000.00716.96
8.0.80.0100.00616.87
8.0.70.0000.00816.79
8.0.60.0040.00416.85
8.0.50.0040.00416.70
8.0.30.0070.01416.96
8.0.20.0090.01017.40
8.0.10.0040.00416.99
8.0.00.0060.01116.83
7.4.330.0050.00015.15
7.4.320.0030.00316.39
7.4.300.0070.00016.55
7.4.290.0040.00716.60
7.4.280.0040.00416.57
7.4.270.0070.00016.44
7.4.260.0000.00816.53
7.4.250.0040.00416.46
7.4.240.0070.00016.59
7.4.230.0070.00016.59
7.4.220.0140.00416.70
7.4.210.0090.00816.53
7.4.200.0040.00416.67
7.4.160.0060.01016.46
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0150.00616.56
7.4.120.0110.00916.51
7.4.110.0110.01116.53
7.4.100.0060.01316.26
7.4.90.0060.01216.63
7.4.80.0150.00919.39
7.4.70.0100.00716.64
7.4.60.0100.00616.56
7.4.50.0050.00316.45
7.4.40.0100.00716.56
7.4.30.0120.00616.60
7.4.00.0060.01214.82
7.3.330.0040.00413.18
7.3.320.0060.00013.06
7.3.310.0060.00316.32
7.3.300.0030.00316.30
7.3.290.0000.00716.27
7.3.280.0050.01316.23
7.3.270.0110.00717.40
7.3.260.0130.00316.26
7.3.250.0080.00916.43
7.3.240.0120.00916.54
7.3.230.0050.01116.44
7.3.210.0090.00616.30
7.3.200.0000.01716.26
7.3.190.0090.00616.53
7.3.180.0090.00916.41
7.3.170.0000.01516.59
7.3.160.0060.01216.46
7.3.120.0080.01114.94
7.3.110.0090.00614.91
7.3.100.0110.00814.71
7.3.90.0100.00714.59
7.3.80.0030.01514.92
7.3.70.0090.00314.68
7.3.60.0030.01214.87
7.3.50.0060.00614.72
7.3.40.0060.00914.91
7.3.30.0120.00314.38
7.3.20.0090.00616.67
7.3.10.0080.00816.62
7.3.00.0070.00716.47
7.2.330.0030.01316.64
7.2.320.0030.02016.64
7.2.310.0110.00516.72
7.2.300.0100.00716.50
7.2.290.0090.01516.63
7.2.250.0120.00614.96
7.2.240.0090.00915.03
7.2.230.0070.01014.77
7.2.220.0060.01315.14
7.2.210.0030.01415.00
7.2.200.0030.01014.91
7.2.190.0000.01214.95
7.2.180.0100.00714.90
7.2.170.0090.00615.04
7.2.60.0100.00316.94
7.2.00.0000.01019.29
7.1.330.0090.00615.73
7.1.320.0040.00715.55
7.1.310.0070.01115.77
7.1.300.0060.00615.32
7.1.290.0090.00615.47
7.1.280.0060.00315.32
7.1.270.0080.00515.57
7.1.260.0060.00915.59
7.1.200.0000.01515.70
7.1.100.0030.01318.34
7.1.70.0040.00417.11
7.1.60.0110.01419.18
7.1.50.0070.01617.06
7.1.00.0100.07022.60
7.0.200.0030.01016.81
7.0.60.0030.08319.96
7.0.50.0170.07018.03
7.0.40.0130.08019.96
7.0.30.0230.04020.25
7.0.20.0270.05720.29
7.0.10.0100.08720.32
7.0.00.0030.05020.12
5.6.210.0130.07020.63
5.6.200.0000.04718.29
5.6.190.0030.04320.33
5.6.180.0400.04320.48
5.6.170.0370.07320.51
5.6.160.0070.08720.39
5.6.150.0070.07318.14
5.6.140.0070.04718.27
5.6.130.0030.06018.29
5.6.120.0130.08021.04
5.6.110.0030.09021.05
5.6.100.0100.06021.19
5.6.90.0070.08321.19
5.6.80.0030.08320.31
5.5.350.0230.07720.36
5.5.340.0100.03317.94
5.5.330.0170.03020.46
5.5.320.0400.07020.19
5.5.310.0300.07020.38
5.5.300.0030.04318.07
5.5.290.0030.08318.10
5.5.280.0070.03720.89
5.5.270.0030.08720.77
5.5.260.0070.08720.67
5.5.250.0030.07320.75
5.5.240.0030.07720.16
5.4.450.0130.05719.61
5.4.440.0830.06319.59
5.4.430.0900.08319.33
5.4.420.0930.05019.72
5.4.410.0970.07019.06
5.4.400.0900.07019.29
5.4.390.0930.06719.43
5.4.380.0800.05319.26
5.4.370.0770.05318.84
5.4.360.0700.06319.37
5.4.350.0670.05019.14
5.4.340.0730.05718.84
5.4.320.0770.05719.37
5.4.310.0730.06319.37
5.4.300.0730.05019.26
5.4.290.0800.04719.03
5.4.280.0770.06019.25
5.4.270.0700.05319.28
5.4.260.0670.05719.25
5.4.250.0730.06019.24
5.4.240.0630.05719.25
5.4.230.0630.05719.25
5.4.220.0600.06019.27
5.4.210.0800.05319.29
5.4.200.0730.05716.55
5.4.190.0730.05318.95
5.4.180.0830.05319.21
5.4.170.0830.05719.00
5.4.160.0800.04318.97
5.4.150.0700.04719.20
5.4.140.0670.05016.46
5.4.130.0700.05716.20
5.4.120.0670.05716.38
5.4.110.0800.05316.47
5.4.100.0730.05016.42
5.4.90.0770.04716.16
5.4.80.0800.04716.41
5.4.70.0800.05016.27
5.4.60.0830.04016.41
5.4.50.0770.05316.35
5.4.40.0830.04716.27
5.4.30.0830.07016.23
5.4.20.0770.06316.38
5.4.10.1000.07016.41
5.4.00.0700.05015.82
5.3.290.0630.06314.51
5.3.280.0930.06314.53
5.3.270.0830.05014.45
5.3.260.0730.05014.48
5.3.250.0970.06314.56
5.3.240.0830.04714.46
5.3.230.0830.05314.48
5.3.220.0730.04714.44
5.3.210.0900.04714.42
5.3.200.0870.06314.55
5.3.190.0600.05714.55
5.3.180.0630.06014.42
5.3.170.0770.05014.52
5.3.160.0730.04714.58
5.3.150.0570.06714.36
5.3.140.0630.05314.39
5.3.130.0600.06014.39
5.3.120.0700.05314.64
5.3.110.0630.06314.39
5.3.100.0700.05013.87
5.3.90.0830.06313.97
5.3.80.0900.05313.86
5.3.70.0770.06313.89
5.3.60.0830.05713.95
5.3.50.0700.04713.75
5.3.40.0700.05013.91
5.3.30.0600.06014.00
5.3.20.0100.04713.67
5.3.10.0070.05313.67
5.3.00.0670.04013.47
5.2.170.0600.04010.98
5.2.160.0600.04311.09
5.2.150.0600.04711.01
5.2.140.0570.04310.98
5.2.130.0170.04311.09
5.2.120.0200.04011.04
5.2.110.0230.04711.11
5.2.100.0670.04010.96
5.2.90.0700.05010.96
5.2.80.0530.04310.96
5.2.70.0770.05311.05
5.2.60.0730.07311.20
5.2.50.0870.04710.86
5.2.40.0470.03710.86
5.2.30.0370.04711.13
5.2.20.0400.04010.86
5.2.10.0500.03710.75
5.2.00.0400.04010.73
5.1.60.0400.04010.05
5.1.50.0570.0409.96
5.1.40.0470.03710.06
5.1.30.0500.04010.29
5.1.20.0600.03310.36
5.1.10.0430.0379.98
5.1.00.0300.03710.23
5.0.50.0170.0308.41
5.0.40.0130.0238.48
5.0.30.0100.0478.11
5.0.20.0000.0338.09
5.0.10.0030.0278.15
5.0.00.0230.0478.20
4.4.90.0230.0207.27
4.4.80.0200.0237.27
4.4.70.0070.0307.27
4.4.60.0170.0237.27
4.4.50.0200.0207.27
4.4.40.0000.0407.27
4.4.30.0130.0207.27
4.4.20.0070.0207.27
4.4.10.0100.0177.27
4.4.00.0170.0207.27
4.3.110.0100.0177.27
4.3.100.0200.0237.27
4.3.90.0130.0237.27
4.3.80.0300.0277.27
4.3.70.0170.0237.27
4.3.60.0000.0337.27
4.3.50.0100.0177.27
4.3.40.0070.0307.27
4.3.30.0070.0237.27
4.3.20.0100.0237.27
4.3.10.0070.0237.27
4.3.00.0070.0277.18

preferences:
54.61 ms | 400 KiB | 5 Q