3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo openssl_cipher_iv_length('aes-256-gcm'); $secret="This is a secret message."; $key="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.60.0150.00616.63
8.3.50.0080.01021.11
8.3.40.0070.00718.71
8.3.30.0080.00818.70
8.3.20.0000.00820.26
8.3.10.0070.00023.52
8.3.00.0030.00721.72
8.2.180.0120.00316.63
8.2.170.0180.00422.96
8.2.160.0070.00721.95
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0060.00317.63
8.2.110.0070.00320.35
8.2.100.0110.00018.03
8.2.90.0000.00719.07
8.2.80.0030.00617.97
8.2.70.0040.00417.63
8.2.60.0000.00817.91
8.2.50.0040.00418.07
8.2.40.0050.00321.09
8.2.30.0040.00419.78
8.2.20.0000.00817.59
8.2.10.0040.00417.99
8.2.00.0000.00718.05
8.1.280.0140.00425.92
8.1.270.0000.00820.29
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00319.01
8.1.230.0110.00017.83
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0030.00617.23
8.1.190.0000.00817.13
8.1.180.0080.00018.10
8.1.170.0060.00318.53
8.1.160.0000.00721.91
8.1.150.0000.00718.88
8.1.140.0040.00417.26
8.1.130.0030.00317.68
8.1.120.0050.00217.39
8.1.110.0000.00717.41
8.1.100.0000.00717.42
8.1.90.0000.00717.23
8.1.80.0080.00017.38
8.1.70.0000.00717.28
8.1.60.0000.00817.56
8.1.50.0000.00917.49
8.1.40.0060.00317.49
8.1.30.0040.00417.59
8.1.20.0030.00517.65
8.1.10.0040.00417.50
8.1.00.0030.00517.56
8.0.300.0070.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00718.39
8.0.270.0030.00317.11
8.0.260.0030.00317.06
8.0.250.0000.00816.81
8.0.240.0000.00716.98
8.0.230.0070.00016.93
8.0.220.0040.00416.80
8.0.210.0030.00616.87
8.0.200.0000.00616.94
8.0.190.0000.00816.96
8.0.180.0000.00716.83
8.0.170.0000.00916.95
8.0.160.0000.00716.91
8.0.150.0030.00316.84
8.0.140.0000.00816.84
8.0.130.0040.00413.37
8.0.120.0000.00716.82
8.0.110.0020.00516.89
8.0.100.0070.00016.86
8.0.90.0040.00416.76
8.0.80.0100.01316.94
8.0.70.0000.00716.89
8.0.60.0070.00016.88
8.0.50.0040.00416.95
8.0.30.0090.00916.99
8.0.20.0170.00717.40
8.0.10.0000.00816.88
8.0.00.0120.00616.75
7.4.330.0050.00015.20
7.4.320.0000.00616.51
7.4.300.0030.00316.48
7.4.290.0000.00716.58
7.4.280.0040.00416.57
7.4.270.0040.00416.65
7.4.260.0030.00716.48
7.4.250.0070.00016.57
7.4.240.0060.00116.55
7.4.230.0070.00016.38
7.4.220.0040.01516.62
7.4.210.0070.01016.65
7.4.200.0000.00816.39
7.4.160.0000.01516.38
7.4.150.0160.00417.40
7.4.140.0160.00617.86
7.4.130.0060.01316.49
7.4.120.0120.00516.42
7.4.110.0070.01116.56
7.4.100.0160.00316.45
7.4.90.0090.00916.48
7.4.80.0160.00619.39
7.4.70.0100.00716.52
7.4.60.0120.00316.58
7.4.50.0040.00416.30
7.4.40.0130.00316.63
7.4.30.0090.00916.41
7.3.330.0050.00213.20
7.3.320.0030.00313.15
7.3.310.0040.00416.24
7.3.300.0030.00316.10
7.3.290.0030.00316.24
7.3.280.0110.00916.28
7.3.270.0140.00917.40
7.3.260.0130.00716.46
7.3.250.0130.00516.32
7.3.240.0130.01016.32
7.3.230.0140.00816.39
7.3.210.0130.00316.37
7.3.200.0100.00716.30
7.3.190.0080.00816.42
7.3.180.0130.00716.46
7.3.170.0080.00916.42
7.3.160.0190.00316.50
7.2.330.0090.00616.32
7.2.320.0140.02116.59
7.2.310.0040.01216.39
7.2.300.0110.00616.14
7.2.290.0090.01216.48
7.2.00.0190.00319.60
7.1.70.0080.00017.01
7.1.60.0090.01519.18
7.1.50.0130.01317.05
7.1.00.0030.07722.49
7.0.200.0060.00616.95
7.0.60.0100.03720.16
7.0.50.0100.07718.00
7.0.40.0170.07320.37
7.0.30.0200.04720.13
7.0.20.0370.07320.36
7.0.10.0230.04020.40
7.0.00.0100.05020.45
5.6.280.0000.04021.23
5.6.210.0100.06720.68
5.6.200.0170.07318.35
5.6.190.0130.04720.86
5.6.180.0030.08020.73
5.6.170.0330.07020.74
5.6.160.0170.07320.72
5.6.150.0100.08318.31
5.6.140.0070.04318.34
5.6.130.0030.04318.36
5.6.120.0100.07721.11
5.6.110.0000.04721.20
5.6.100.0170.07321.09
5.6.90.0030.04321.12
5.6.80.0100.05720.47
5.6.70.0130.03320.51
5.5.350.0030.08320.34
5.5.340.0070.04018.04
5.5.330.0000.04720.69
5.5.320.0070.04720.34
5.5.310.0400.06020.63
5.5.300.0070.04017.94
5.5.290.0000.04318.05
5.5.280.0100.08020.84
5.5.270.0000.08720.97
5.5.260.0130.07720.67
5.5.250.0170.07320.70
5.5.240.0130.07020.41
5.4.450.0600.06719.51
5.4.440.0230.06319.79
5.4.430.0270.05719.30
5.4.420.0300.04319.76
5.4.410.0270.04319.06
5.4.400.0230.05319.44
5.4.390.0200.06718.98
5.4.380.0270.05719.18
5.4.370.0100.06719.07
5.4.360.0230.06019.43
5.4.350.0200.06719.37
5.4.340.0100.06319.44
5.4.320.0070.06718.98
5.4.310.0030.06019.18
5.4.300.0570.05019.26
5.4.290.0500.06319.14
5.4.280.0600.05718.87
5.4.270.0430.05719.27
5.4.260.0670.05319.14
5.4.250.0600.05719.42
5.4.240.0670.05319.26
5.4.230.0630.06019.46
5.4.220.0770.05019.34
5.4.210.0870.04019.11
5.4.200.0670.05316.59
5.4.190.0770.07319.28
5.4.180.0830.05319.02
5.4.170.0870.05319.01
5.4.160.0670.06319.35
5.4.150.0670.05319.18
5.4.140.0800.05016.18
5.4.130.0670.07016.58
5.4.120.0670.05716.31
5.4.110.0630.05316.44
5.4.100.0530.04716.30
5.4.90.0730.04316.37
5.4.80.0500.04316.39
5.4.70.0570.05316.32
5.4.60.0730.04716.34
5.4.50.0630.06016.24
5.4.40.0670.06016.32
5.4.30.0670.05316.23
5.4.20.0630.06716.34
5.4.10.0670.04716.54
5.4.00.0670.05315.75
5.3.290.0770.06314.61
5.3.280.0570.06714.43
5.3.270.0500.05714.54
5.3.260.0630.06014.55
5.3.250.0730.05014.48
5.3.240.0900.06314.48
5.3.230.0670.07014.56
5.3.220.0470.07314.56
5.3.210.0570.05714.57
5.3.200.0570.05314.58
5.3.190.0700.05014.41
5.3.180.0770.06314.52
5.3.170.0600.05314.51
5.3.160.0700.06314.42
5.3.150.0630.05714.41
5.3.140.0670.07014.43
5.3.130.0600.06014.39
5.3.120.0530.06014.34
5.3.110.0430.05714.42
5.3.100.0670.05013.99
5.3.90.0630.06014.00
5.3.80.0670.06313.88
5.3.70.0700.05013.98
5.3.60.0670.05013.80
5.3.50.0430.05713.74
5.3.40.0600.05013.72
5.3.30.0630.06713.93
5.3.20.0600.06313.67
5.3.10.0630.03713.64
5.3.00.0570.05713.48
5.2.170.0600.04311.19
5.2.160.0400.05010.99
5.2.150.0430.05010.99
5.2.140.0470.04311.13
5.2.130.0530.03710.95
5.2.120.0500.03710.94
5.2.110.0400.04311.12
5.2.100.0330.04711.18
5.2.90.0470.03710.90
5.2.80.0670.04311.11
5.2.70.0630.03711.08
5.2.60.0470.04011.13
5.2.50.0570.03710.95
5.2.40.0370.04010.98
5.2.30.0370.04310.80
5.2.20.0530.05010.94
5.2.10.0530.03710.80
5.2.00.0430.04310.61
5.1.60.0470.0409.96
5.1.50.0470.03710.01
5.1.40.0330.0339.84
5.1.30.0370.03310.18
5.1.20.0470.04010.36
5.1.10.0200.0479.93
5.1.00.0400.03710.04
5.0.50.0200.0338.52
5.0.40.0230.0238.35
5.0.30.0230.0408.19
5.0.20.0230.0278.18
5.0.10.0270.0378.01
5.0.00.0170.0478.18
4.4.90.0300.0137.39
4.4.80.0300.0177.39
4.4.70.0270.0207.39
4.4.60.0200.0207.39
4.4.50.0370.0177.39
4.4.40.0230.0377.39
4.4.30.0230.0237.39
4.4.20.0170.0207.39
4.4.10.0170.0237.43
4.4.00.0230.0337.43
4.3.110.0270.0207.43
4.3.100.0230.0237.43
4.3.90.0130.0237.43
4.3.80.0200.0377.43
4.3.70.0200.0237.43
4.3.60.0200.0277.43
4.3.50.0270.0207.43
4.3.40.0330.0337.44
4.3.30.0000.0277.44
4.3.20.0070.0277.44
4.3.10.0170.0177.44
4.3.00.0100.0237.35

preferences:
83.32 ms | 401 KiB | 5 Q