3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getExpectedCiphertextSize(int $sizeOfInput) : int { $padding = ($sizeOfInput % 16); if ($padding === 0) { // PKCS7 $padding += 16; } return 16 // IV + 32 // HMAC-SHA-256 + $sizeOfInput + $padding; } var_dump(getExpectedCiphertextSize(100));

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.0100.01016.38
8.3.50.0100.00616.39
8.3.40.0120.00818.55
8.3.30.0070.00718.70
8.3.20.0000.00720.39
8.3.10.0000.00723.66
8.3.00.0050.00223.48
8.2.180.0110.00716.75
8.2.170.0130.00722.96
8.2.160.0070.00720.47
8.2.150.0080.00024.18
8.2.140.0170.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00419.89
8.2.110.0000.01120.96
8.2.100.0090.00317.78
8.2.90.0030.00517.84
8.2.80.0000.00818.02
8.2.70.0060.00317.63
8.2.60.0050.00318.03
8.2.50.0000.00818.07
8.2.40.0000.00822.39
8.2.30.0040.00420.59
8.2.20.0050.00217.59
8.2.10.0040.00417.93
8.2.00.0070.00018.06
8.1.280.0070.01025.92
8.1.270.0060.00322.19
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0000.01024.00
8.1.230.0070.00320.98
8.1.220.0030.00617.74
8.1.210.0040.00418.88
8.1.200.0000.00917.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0070.00318.64
8.1.160.0030.00520.75
8.1.150.0040.00418.89
8.1.140.0030.00619.47
8.1.130.0040.00417.64
8.1.120.0000.00717.30
8.1.110.0080.00017.29
8.1.100.0040.00417.32
8.1.90.0040.00417.37
8.1.80.0040.00417.41
8.1.70.0000.00717.32
8.1.60.0030.00517.59
8.1.50.0000.00817.33
8.1.40.0030.00617.42
8.1.30.0000.00717.54
8.1.20.0040.00417.67
8.1.10.0080.00017.48
8.1.00.0030.00617.42
8.0.300.0080.00019.89
8.0.290.0000.00716.63
8.0.280.0000.00718.36
8.0.270.0070.00017.29
8.0.260.0030.00317.20
8.0.250.0030.00316.99
8.0.240.0070.00016.87
8.0.230.0000.00716.96
8.0.220.0030.00316.91
8.0.210.0070.00016.89
8.0.200.0060.00016.96
8.0.190.0000.00816.99
8.0.180.0030.00316.96
8.0.170.0000.00716.93
8.0.160.0000.00816.87
8.0.150.0000.00716.88
8.0.140.0040.00416.80
8.0.130.0000.00613.28
8.0.120.0000.00816.87
8.0.110.0030.00516.88
8.0.100.0060.00316.84
8.0.90.0040.00416.92
8.0.80.0090.00616.77
8.0.70.0050.00316.89
8.0.60.0040.00417.02
8.0.50.0080.00016.85
8.0.30.0090.01117.23
8.0.20.0110.00817.40
8.0.10.0000.00717.02
8.0.00.0090.01116.85
7.4.330.0000.00516.76
7.4.320.0000.00616.49
7.4.300.0000.00816.52
7.4.290.0000.00716.51
7.4.280.0030.00716.63
7.4.270.0030.00316.56
7.4.260.0030.00316.58
7.4.250.0040.00416.56
7.4.240.0040.00416.45
7.4.230.0040.00416.41
7.4.220.0070.01316.68
7.4.210.0050.00916.51
7.4.200.0000.00716.55
7.4.160.0100.00716.58
7.4.150.0150.00617.40
7.4.140.0150.00517.86
7.4.130.0080.00916.42
7.4.120.0090.00916.54
7.4.110.0120.01216.61
7.4.100.0040.01416.48
7.4.90.0070.01016.57
7.4.80.0030.01319.39
7.4.70.0100.00716.59
7.4.60.0130.00316.44
7.4.50.0040.00816.49
7.4.40.0060.00916.62
7.4.30.0120.00616.44
7.4.00.0000.01615.06
7.3.330.0060.00013.22
7.3.320.0050.00013.28
7.3.310.0000.00716.32
7.3.300.0030.00316.38
7.3.290.0070.00016.37
7.3.280.0110.00716.36
7.3.270.0140.00417.40
7.3.260.0030.01316.42
7.3.250.0090.00916.33
7.3.240.0070.00916.42
7.3.230.0060.01116.53
7.3.210.0110.00716.30
7.3.200.0090.00919.39
7.3.190.0100.00716.25
7.3.180.0060.01116.67
7.3.170.0150.00616.30
7.3.160.0090.01216.39
7.2.330.0070.01116.81
7.2.320.0210.00716.63
7.2.310.0070.01016.73
7.2.300.0090.00916.73
7.2.290.0130.01016.49
7.2.60.0030.01016.76
7.2.00.0060.00619.37
7.1.200.0000.00915.73
7.1.100.0060.00617.96
7.1.70.0030.01317.12
7.1.60.0140.01119.20
7.1.50.0060.01616.73
7.1.00.0030.07722.43
7.0.200.0190.00314.88
7.0.60.0070.07721.81
7.0.50.0000.08717.84
7.0.40.0100.03720.23
7.0.30.0300.04020.23
7.0.20.0300.07320.05
7.0.10.0030.08720.23
7.0.00.0070.08720.06
5.6.280.0070.03320.82
5.6.210.0070.05720.53
5.6.200.0030.04318.13
5.6.190.0000.09020.49
5.6.180.0330.07320.55
5.6.170.0330.03320.54
5.6.160.0100.03320.50
5.6.150.0130.05318.18
5.6.140.0070.08018.18
5.6.130.0070.05018.14
5.6.120.0200.05020.98
5.6.110.0030.04020.89
5.6.100.0170.07720.98
5.6.90.0070.07020.97
5.6.80.0170.06320.48
5.5.350.0270.06020.32
5.5.340.0030.04318.02
5.5.330.0100.08020.21
5.5.320.0570.06720.25
5.5.310.0200.04320.30
5.5.300.0100.07717.95
5.5.290.0070.05718.08
5.5.280.0030.04320.87
5.5.270.0130.08320.68
5.5.260.0030.04020.82
5.5.250.0100.08020.49
5.5.240.0300.06320.26

preferences:
61.24 ms | 400 KiB | 5 Q