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 = pack("H*", "0e42519c0eda67c22c52b605ff41fde395880ebf6ed40a560b5f5ecc8183d26a"); $method="aes-256-gcm"; $encrypted = pack("H*", "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.0060.01016.75
8.3.50.0140.00016.37
8.3.40.0080.00818.57
8.3.30.0140.00018.69
8.3.20.0040.00420.25
8.3.10.0070.00023.74
8.3.00.0080.00420.59
8.2.180.0090.00618.29
8.2.170.0070.00722.96
8.2.160.0100.00321.91
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0070.00417.63
8.2.110.0040.00422.13
8.2.100.0040.00817.91
8.2.90.0040.00419.07
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0040.00417.92
8.2.50.0040.00418.07
8.2.40.0000.00821.10
8.2.30.0000.00819.78
8.2.20.0030.00517.68
8.2.10.0070.00018.14
8.2.00.0050.00317.99
8.1.270.0080.00020.18
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0120.00021.85
8.1.230.0090.00322.13
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0050.00317.25
8.1.180.0040.00418.10
8.1.170.0090.00018.52
8.1.160.0000.00821.83
8.1.150.0080.00018.71
8.1.140.0000.00817.31
8.1.130.0080.00017.64
8.1.120.0040.00417.30
8.1.110.0080.00017.28
8.1.100.0040.00417.30
8.1.90.0070.00017.25
8.1.80.0000.00717.43
8.1.70.0030.00317.41
8.1.60.0030.00517.54
8.1.50.0070.00417.46
8.1.40.0080.00017.56
8.1.30.0000.00817.48
8.1.20.0030.00617.59
8.1.10.0030.00617.57
8.1.00.0090.00017.50
8.0.300.0060.00318.77
8.0.290.0040.00416.63
8.0.280.0070.00018.30
8.0.270.0030.00317.11
8.0.260.0000.00617.21
8.0.250.0050.00216.96
8.0.240.0060.00016.99
8.0.230.0090.00016.84
8.0.220.0000.00716.80
8.0.210.0070.00016.83
8.0.200.0030.00316.98
8.0.190.0040.00416.94
8.0.180.0030.00516.95
8.0.170.0040.00416.84
8.0.160.0030.00317.03
8.0.150.0000.00716.90
8.0.140.0040.00416.79
8.0.130.0050.00313.41
8.0.120.0040.00416.89
8.0.110.0080.00016.86
8.0.100.0000.00716.93
8.0.90.0040.00416.93
8.0.80.0090.00616.94
8.0.70.0040.00416.96
8.0.60.0020.00516.89
8.0.50.0040.00416.93
8.0.30.0070.01116.81
8.0.20.0140.01117.40
8.0.10.0000.00716.87
8.0.00.0080.00916.70
7.4.330.0000.00515.08
7.4.320.0000.00716.45
7.4.300.0050.00216.52
7.4.290.0000.00716.51
7.4.280.0000.00716.43
7.4.270.0030.00316.60
7.4.260.0070.00316.46
7.4.250.0040.00416.48
7.4.240.0020.00516.53
7.4.230.0000.00716.59
7.4.220.0150.00916.47
7.4.210.0080.00516.67
7.4.200.0070.00016.49
7.4.160.0060.01016.57
7.4.150.0090.00917.40
7.4.140.0120.00617.86
7.4.130.0050.01316.57
7.4.120.0100.00716.42
7.4.110.0110.00716.48
7.4.100.0100.01016.45
7.4.90.0110.00616.56
7.4.80.0060.01619.39
7.4.70.0100.00616.52
7.4.60.0030.01316.50
7.4.50.0030.00316.41
7.4.40.0080.00816.70
7.4.30.0030.01516.35
7.4.10.0070.00714.73
7.4.00.0080.00615.00
7.3.330.0040.00412.99
7.3.320.0070.00012.99
7.3.310.0030.00316.20
7.3.300.0070.00016.17
7.3.290.0030.00316.24
7.3.280.0080.00816.29
7.3.270.0120.00917.40
7.3.260.0120.00616.41
7.3.250.0090.00916.40
7.3.240.0090.00916.59
7.3.230.0060.01616.48
7.3.210.0160.00616.48
7.3.200.0150.00316.16
7.3.190.0120.00316.37
7.3.180.0120.00616.17
7.3.170.0040.01716.27
7.3.160.0140.00916.35
7.3.130.0060.01214.52
7.3.120.0100.00714.59
7.3.110.0100.00714.67
7.3.100.0060.01014.66
7.3.90.0070.01014.75
7.3.80.0100.01014.80
7.3.70.0100.00314.91
7.3.60.0100.00714.46
7.3.50.0000.01214.50
7.3.40.0100.00714.76
7.3.30.0060.00814.47
7.3.20.0070.00716.51
7.3.10.0060.01316.36
7.3.00.0070.01116.42
7.2.330.0070.01016.73
7.2.320.0140.01016.67
7.2.310.0140.00916.63
7.2.300.0060.01216.56
7.2.290.0140.00716.55
7.2.260.0030.01715.08
7.2.250.0040.01114.87
7.2.240.0000.01415.02
7.2.230.0050.00514.91
7.2.220.0120.00614.88
7.2.210.0090.00914.78
7.2.200.0000.00915.07
7.2.190.0110.00714.79
7.2.180.0090.00914.74
7.2.170.0070.00714.95
7.2.160.0030.01014.71
7.2.150.0030.01216.64
7.2.140.0120.00616.80
7.2.130.0080.00616.89
7.2.120.0070.01016.93
7.2.110.0060.00916.59
7.2.100.0030.01216.58
7.2.90.0090.00016.59
7.2.80.0030.01416.64
7.2.70.0130.00316.87
7.2.60.0050.00916.94
7.2.50.0060.00916.89
7.2.40.0040.01116.91
7.2.30.0040.00716.87
7.2.20.0040.01516.63
7.2.10.0000.01216.65
7.2.00.0050.00818.20
7.1.330.0030.01015.86
7.1.320.0000.01615.59
7.1.310.0030.01015.46
7.1.300.0030.01515.66
7.1.290.0060.01015.68
7.1.280.0030.01015.33
7.1.270.0100.00315.69
7.1.260.0070.00415.75
7.1.250.0040.01115.73
7.1.240.0030.00615.52
7.1.230.0070.01015.82
7.1.220.0060.00915.73
7.1.210.0090.00615.68
7.1.200.0090.00415.82
7.1.190.0100.00315.78
7.1.180.0060.00615.74
7.1.170.0030.00715.82
7.1.160.0120.00315.79
7.1.150.0070.01115.59
7.1.140.0070.00715.57
7.1.130.0000.01515.51
7.1.120.0130.00015.48
7.1.110.0040.01115.77
7.1.100.0020.00816.85
7.1.90.0120.00415.72
7.1.80.0090.00615.85
7.1.70.0060.00416.38
7.1.60.0060.01217.38
7.1.50.0060.01316.44
7.1.40.0060.00615.82
7.1.30.0000.01715.66
7.1.20.0030.01015.81
7.1.10.0030.00715.68
7.1.00.0050.03919.08
7.0.330.0080.00815.23
7.0.320.0040.01115.32
7.0.310.0070.00315.23
7.0.300.0040.00815.31
7.0.290.0000.01315.07
7.0.280.0030.01015.28
7.0.270.0090.00015.50
7.0.260.0030.00715.30
7.0.250.0000.00915.16
7.0.240.0070.00415.25
7.0.230.0060.00615.39
7.0.220.0060.00915.38
7.0.210.0030.00615.44
7.0.200.0060.00516.06
7.0.190.0060.00615.35
7.0.180.0030.00515.10
7.0.170.0030.00615.19
7.0.160.0070.00415.19
7.0.150.0060.00615.41
7.0.140.0060.00615.39
7.0.130.0000.01515.38
7.0.120.0100.00315.43
7.0.110.0030.01015.39
7.0.100.0030.00915.04
7.0.90.0040.00815.20
7.0.80.0000.01415.07
7.0.70.0030.00515.20
7.0.60.0080.03717.78
7.0.50.0050.04816.72
7.0.40.0050.03916.89
7.0.30.0150.02316.81
7.0.20.0150.03716.85
7.0.10.0050.04216.68
7.0.00.0070.03016.72
5.6.400.0080.00914.43
5.6.390.0080.00813.97
5.6.380.0110.00414.05
5.6.370.0080.00813.82
5.6.360.0030.01014.18
5.6.350.0060.00914.18
5.6.340.0060.01014.24
5.6.330.0040.00414.43
5.6.320.0110.00414.33
5.6.310.0060.00614.34
5.6.300.0030.00913.91
5.6.290.0040.00414.35
5.6.280.0030.04317.60
5.6.270.0070.01014.28
5.6.260.0030.00614.45
5.6.250.0000.01014.51
5.6.240.0030.01014.18
5.6.230.0110.00414.34
5.6.220.0030.00914.28
5.6.210.0050.04317.32
5.6.200.0070.02616.34
5.6.190.0030.03017.34
5.6.180.0250.04417.59
5.6.170.0170.04317.52
5.6.160.0130.02517.36
5.6.150.0060.04516.12
5.6.140.0070.02316.11
5.6.130.0050.04716.28
5.6.120.0080.05717.68
5.6.110.0130.04117.56
5.6.100.0070.04017.69
5.6.90.0050.04717.50
5.6.80.0060.04317.44
5.6.70.0070.01013.93
5.6.60.0000.01814.18
5.6.50.0070.01014.11
5.6.40.0000.01414.16
5.6.30.0030.00713.96
5.6.20.0060.00614.02
5.6.10.0140.00014.08
5.6.00.0000.01314.06
5.5.380.0030.00713.84
5.5.370.0060.00614.39
5.5.360.0000.01114.07
5.5.350.0140.04417.25
5.5.340.0040.02916.08
5.5.330.0070.04017.18
5.5.320.0230.04417.31
5.5.310.0140.02717.18
5.5.300.0070.04116.07
5.5.290.0070.04716.05
5.5.280.0050.04917.69
5.5.270.0110.03817.48
5.5.260.0050.03217.56
5.5.250.0050.04317.22
5.5.240.0060.03717.26
5.5.230.0060.00314.00
5.5.220.0070.00713.88
5.5.210.0070.01014.11
5.5.200.0110.00313.71
5.5.190.0000.01314.30
5.5.180.0000.01313.93
5.5.170.0100.00313.91
5.5.160.0060.00614.11
5.5.150.0090.00613.91
5.5.140.0040.00813.98
5.5.130.0040.01114.14
5.5.120.0030.01014.24
5.5.110.0000.01313.93
5.5.100.0140.00013.89
5.5.90.0030.00713.98
5.5.80.0100.00313.89
5.5.70.0070.00713.84
5.5.60.0040.00713.94
5.5.50.0040.00414.13
5.5.40.0040.00413.76
5.5.30.0070.00713.76
5.5.20.0060.00913.61
5.5.10.0080.00614.20
5.5.00.0040.00814.04
5.4.450.0170.02515.39
5.4.440.0380.02915.24
5.4.430.0410.02815.24
5.4.420.0190.03515.36
5.4.410.0090.04215.26
5.4.400.0080.03415.08
5.4.390.0090.03615.08
5.4.380.0080.03215.02
5.4.370.0770.03015.15
5.4.360.0550.03715.08
5.4.350.0430.02815.14
5.4.340.0410.03014.88
5.4.330.0040.00410.90
5.4.320.0380.03914.87
5.4.310.0470.03815.12
5.4.300.0380.04414.87
5.4.290.0450.04015.15
5.4.280.0630.03514.96
5.4.270.0360.03815.02
5.4.260.0440.02815.14
5.4.250.0480.03415.16
5.4.240.0370.03315.07
5.4.230.0850.03015.07
5.4.220.0970.03715.09
5.4.210.0420.03515.05
5.4.200.0550.03613.83
5.4.190.0580.03414.95
5.4.180.0530.02714.97
5.4.170.0530.04515.14
5.4.160.0430.04514.96
5.4.150.0440.02915.06
5.4.140.0210.03613.63
5.4.130.0070.03713.55
5.4.120.0070.03113.59
5.4.110.0550.03313.72
5.4.100.0550.03713.73
5.4.90.0410.03113.57
5.4.80.0360.02513.57
5.4.70.0080.03313.62
5.4.60.0070.03413.67
5.4.50.0180.03013.62
5.4.40.0550.02513.72
5.4.30.0610.03113.60
5.4.20.0560.03013.56
5.4.10.0220.03413.68
5.4.00.0080.02713.35
5.3.290.0130.06014.50
5.3.280.0700.05314.56
5.3.270.0870.06014.62
5.3.260.1030.04714.44
5.3.250.0970.05014.45
5.3.240.1030.06714.58
5.3.230.0970.04314.43
5.3.220.0970.05314.50
5.3.210.1100.05314.52
5.3.200.1030.06314.55
5.3.190.0930.05014.41
5.3.180.0700.07014.44
5.3.170.1030.06314.45
5.3.160.0830.07314.43
5.3.150.0870.06314.54
5.3.140.0630.05314.53
5.3.130.1100.06314.39
5.3.120.0830.06314.41
5.3.110.0800.06314.54
5.3.100.0900.05713.88
5.3.90.0900.05013.90
5.3.80.0870.06014.03
5.3.70.0670.05313.99
5.3.60.0900.04713.85
5.3.50.0930.05313.72
5.3.40.0600.05713.79
5.3.30.0430.05313.86
5.3.20.0230.05313.53
5.3.10.0200.04313.67
5.3.00.0100.05713.52
5.2.170.0500.04710.99
5.2.160.0570.04311.09
5.2.150.0800.04011.07
5.2.140.0670.04311.30
5.2.130.0700.04311.04
5.2.120.0670.05010.95
5.2.110.0570.04310.96
5.2.100.0600.04710.95
5.2.90.0700.05011.09
5.2.80.0770.05010.94
5.2.70.0670.04311.04
5.2.60.0130.04310.99
5.2.50.0130.04010.92
5.2.40.0100.04010.82
5.2.30.0070.04710.81
5.2.20.0230.04710.87
5.2.10.0770.03710.82
5.2.00.0570.03310.79
5.1.60.0530.0279.96
5.1.50.0530.04310.01
5.1.40.0530.0439.87
5.1.30.0670.03710.34
5.1.20.0630.03310.33
5.1.10.0530.0509.98
5.1.00.0600.03310.00
5.0.50.0330.0308.56
5.0.40.0270.0308.33
5.0.30.0270.0508.11
5.0.20.0330.0308.12
5.0.10.0400.0308.20
5.0.00.0330.0408.13
4.4.90.0230.0207.18
4.4.80.0200.0277.18
4.4.70.0200.0237.18
4.4.60.0300.0177.18
4.4.50.0330.0207.18
4.4.40.0330.0337.18
4.4.30.0330.0307.18
4.4.20.0200.0237.18
4.4.10.0330.0307.18
4.4.00.0400.0407.18
4.3.110.0270.0207.18
4.3.100.0270.0207.18
4.3.90.0370.0207.18
4.3.80.0270.0377.18
4.3.70.0230.0207.18
4.3.60.0300.0307.18
4.3.50.0230.0277.18
4.3.40.0200.0407.18
4.3.30.0130.0237.18
4.3.20.0130.0207.18
4.3.10.0100.0237.18
4.3.00.0000.0237.26

preferences:
62.91 ms | 400 KiB | 5 Q