3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total = 7; $array = [1, 2]; // Dynamic, will be what you get from db. $array += array_fill(count($array), $total - count($array), 'empty'); var_dump($array);

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.0180.00416.63
8.3.50.0090.00918.07
8.3.40.0140.00718.61
8.3.30.0070.00718.47
8.3.20.0000.00721.69
8.3.10.0040.00423.66
8.3.00.0040.00419.66
8.2.180.0110.00416.50
8.2.170.0150.00322.96
8.2.160.0130.00721.07
8.2.150.0060.00324.18
8.2.140.0000.00724.66
8.2.130.0030.00520.52
8.2.120.0040.00426.16
8.2.110.0100.00022.28
8.2.100.0110.00020.48
8.2.90.0040.00419.95
8.2.80.0000.00817.97
8.2.70.0080.00018.04
8.2.60.0050.00317.91
8.2.50.0030.00618.10
8.2.40.0000.00720.42
8.2.30.0040.00421.14
8.2.20.0000.00718.04
8.2.10.0000.00818.04
8.2.00.0050.00318.15
8.1.280.0070.01025.92
8.1.270.0070.00023.89
8.1.260.0080.01126.35
8.1.250.0060.00628.09
8.1.240.0000.00923.84
8.1.230.0040.00719.10
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.36
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0040.00418.50
8.1.160.0040.00418.79
8.1.150.0000.00720.30
8.1.140.0040.00419.56
8.1.130.0090.00017.45
8.1.120.0080.00017.44
8.1.110.0040.00417.48
8.1.100.0000.00717.43
8.1.90.0070.00017.43
8.1.80.0000.00717.43
8.1.70.0000.00717.43
8.1.60.0000.00817.56
8.1.50.0060.00617.49
8.1.40.0000.00917.50
8.1.30.0000.00817.65
8.1.20.0040.00417.63
8.1.10.0040.00417.30
8.1.00.0060.00317.28
8.0.300.0060.00319.60
8.0.290.0060.00316.75
8.0.280.0070.00018.30
8.0.270.0040.00416.80
8.0.260.0000.00716.82
8.0.250.0000.00716.84
8.0.240.0000.00716.96
8.0.230.0070.00016.87
8.0.220.0000.00816.89
8.0.210.0000.00716.75
8.0.200.0030.00716.93
8.0.190.0030.00616.87
8.0.180.0050.00316.93
8.0.170.0040.00316.95
8.0.160.0000.00816.89
8.0.150.0030.00616.85
8.0.140.0000.00716.96
8.0.130.0050.00013.41
8.0.120.0000.00816.93
8.0.110.0030.00516.80
8.0.100.0000.00816.89
8.0.90.0050.00216.81
8.0.80.0150.00616.88
8.0.70.0070.00016.97
8.0.60.0000.00716.89
8.0.50.0000.00716.95
8.0.30.0080.01117.03
8.0.20.0100.00817.40
8.0.10.0040.00417.07
8.0.00.0070.01016.71
7.4.330.0000.00515.55
7.4.320.0060.00016.50
7.4.300.0000.00616.39
7.4.290.0030.00516.60
7.4.280.0000.00716.37
7.4.270.0040.00216.48
7.4.260.0030.00316.56
7.4.250.0080.00016.45
7.4.240.0030.00416.59
7.4.230.0040.00416.61
7.4.220.0080.01616.68
7.4.210.0000.01516.54
7.4.200.0040.00416.38
7.4.160.0050.01116.46
7.4.150.0060.01017.40
7.4.140.0110.00617.86
7.4.130.0130.01016.65
7.4.120.0120.00616.58
7.4.110.0160.01216.57
7.4.100.0100.00716.47
7.4.90.0130.00416.50
7.4.80.0080.00819.39
7.4.70.0090.00616.36
7.4.60.0140.00316.48
7.4.50.0040.00916.58
7.4.40.0130.00316.37
7.4.30.0090.00916.61
7.4.00.0120.00415.07
7.3.330.0020.00212.94
7.3.320.0000.00513.02
7.3.310.0030.00316.07
7.3.300.0060.00016.02
7.3.290.0090.00616.20
7.3.280.0090.00916.20
7.3.270.0140.00317.40
7.3.260.0140.00516.34
7.3.250.0120.00916.18
7.3.240.0070.01416.22
7.3.230.0030.01316.41
7.3.210.0060.01016.23
7.3.200.0090.01216.34
7.3.190.0120.00616.23
7.3.180.0110.00516.29
7.3.170.0100.00716.20
7.3.160.0090.00616.33
7.3.10.0080.00516.44
7.3.00.0040.01216.49
7.2.330.0100.01416.38
7.2.320.0140.00316.68
7.2.310.0090.00916.36
7.2.300.0090.00916.44
7.2.290.0140.00816.33
7.2.130.0090.00616.92
7.2.120.0030.01016.70
7.2.110.0030.01216.95
7.2.100.0030.01316.97
7.2.90.0100.00716.91
7.2.80.0050.00517.06
7.2.70.0100.00616.93
7.2.60.0050.01016.92
7.2.50.0060.00916.75
7.2.40.0140.00316.86
7.2.30.0040.01116.63
7.2.20.0000.01116.69
7.2.10.0100.00617.01
7.2.00.0090.00617.00
7.1.250.0040.01115.63
7.1.200.0030.00515.95
7.1.70.0090.00517.16
7.1.60.0430.01732.98
7.1.50.0730.01733.08
7.1.40.0370.01032.53
7.1.30.0400.01032.65
7.1.20.0630.01732.65
7.1.10.0370.01314.61
7.1.00.0400.01714.75
7.0.200.0270.01014.80
7.0.190.1500.00715.00
7.0.180.0230.01314.62
7.0.170.0300.00314.48
7.0.160.0300.01014.51
7.0.150.0470.01314.33
7.0.140.0270.01314.70
7.0.130.0300.00314.62
7.0.120.0270.01014.73
7.0.110.0370.00014.65
7.0.100.0400.01014.36
7.0.90.0270.00314.41
7.0.80.0270.00714.48
7.0.70.0400.00714.45
7.0.60.0230.01014.42
7.0.50.0500.01314.74
7.0.40.0500.01314.55
7.0.30.0500.01014.67
7.0.20.0270.01014.62
7.0.10.0230.01314.50
7.0.00.0270.01014.52

preferences:
36.01 ms | 401 KiB | 5 Q