3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [0 => 0, 1 => 0, 2 => 8, 3 => 0, 11 => 0, 12 => 0, 15 => 0]; $arr2 = range(1,max($arr1)); // use array_diff to get the missing numbers and create a new array with them $missingNumbers = array_diff($arr1,$arr2); $keys = array_keys($missingNumbers); $Sonuc = array_replace(array_fill(min($keys), max($keys), 999), $arr1); print_r($Sonuc);

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.5.10.0090.00718.93
8.5.00.0150.00919.97
8.4.150.0030.00014.05
8.4.140.0140.01017.13
8.4.130.0130.00717.82
8.4.120.0090.00820.43
8.4.110.0100.01022.38
8.4.100.0130.00817.46
8.4.90.0140.00617.36
8.4.80.0140.00619.30
8.4.70.0090.01217.73
8.4.60.0090.00718.93
8.4.50.0050.00320.48
8.4.40.0060.00317.57
8.4.30.0080.00018.48
8.4.20.0130.00617.78
8.4.10.0030.00619.46
8.3.280.0160.01118.30
8.3.270.0130.00616.38
8.3.260.0150.00516.42
8.3.250.0110.00918.96
8.3.240.0060.00416.69
8.3.230.0110.00816.39
8.3.220.0130.00517.08
8.3.210.0120.00716.64
8.3.200.0050.00416.65
8.3.190.0040.00416.91
8.3.180.0100.00616.42
8.3.170.0100.01017.00
8.3.160.0140.00418.86
8.3.150.0080.00818.86
8.3.140.0060.00318.29
8.3.130.0060.00316.26
8.3.120.0030.00618.84
8.3.110.0030.00616.65
8.3.100.0080.00016.62
8.3.90.0110.00716.48
8.3.80.0040.00417.97
8.3.70.0030.01718.18
8.3.60.0080.00618.32
8.3.50.0080.01123.56
8.3.40.0170.01018.72
8.3.30.0070.00718.43
8.3.20.0080.00020.65
8.3.10.0040.00423.48
8.3.00.0050.00319.56
8.2.290.0130.00420.47
8.2.280.0090.01020.05
8.2.270.0040.01417.38
8.2.260.0110.00718.39
8.2.250.0060.00318.31
8.2.240.0130.00616.88
8.2.230.0030.00620.94
8.2.220.0040.00424.06
8.2.210.0130.00626.77
8.2.200.0080.00016.38
8.2.190.0220.00016.63
8.2.180.0140.00718.41
8.2.170.0070.00722.96
8.2.160.0070.00721.06
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0040.00718.72
8.2.110.0070.00319.45
8.2.100.0040.00817.59
8.2.90.0040.00417.78
8.2.80.0080.00019.70
8.2.70.0030.00517.50
8.2.60.0000.00817.63
8.2.50.0030.00517.55
8.2.40.0050.00319.35
8.2.30.0000.00719.39
8.2.20.0070.00018.05
8.2.10.0050.00219.24
8.2.00.0000.00719.21
8.1.330.0080.00921.84
8.1.320.0090.00921.99
8.1.310.0090.00918.28
8.1.300.0040.00420.18
8.1.290.0040.00418.88
8.1.280.0140.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00323.79
8.1.230.0090.00320.90
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0040.00417.23
8.1.190.0040.00417.11
8.1.180.0110.00018.10
8.1.170.0060.00317.69
8.1.160.0040.00418.83
8.1.150.0080.00018.83
8.1.140.0030.00320.69
8.1.130.0070.00320.19
8.1.120.0070.00017.46
8.1.110.0000.00717.31
8.1.100.0000.00717.41
8.1.90.0030.00317.41
8.1.80.0070.00017.41
8.1.70.0000.00717.39
8.1.60.0060.00317.53
8.1.50.0040.00417.38
8.1.40.0050.00317.44
8.1.30.0030.00517.48
8.1.20.0030.00617.43
8.1.10.0030.00517.38
8.1.00.0040.00417.42
8.0.300.0070.00019.88
8.0.290.0040.00416.63
8.0.280.0030.00318.38
8.0.270.0000.00817.86
8.0.260.0000.00620.00
8.0.250.0040.00416.95
8.0.240.0000.00616.90
8.0.230.0070.00016.77
8.0.220.0000.00716.84
8.0.210.0060.00016.85
8.0.200.0000.00816.86
8.0.190.0040.00416.90
8.0.180.0000.00816.78
8.0.170.0030.00616.77
8.0.160.0050.00316.89
8.0.150.0000.00716.88
8.0.140.0060.00316.68
8.0.130.0030.00313.25
8.0.120.0080.00016.79
8.0.110.0000.00716.66
8.0.100.0000.00716.78
8.0.90.0000.00916.71
8.0.80.0070.01116.78
8.0.70.0050.00216.87
8.0.60.0020.00516.88
8.0.50.0070.00016.73
8.0.30.0100.00616.84
8.0.20.0090.00916.82
8.0.10.0040.00416.75
8.0.00.0060.01316.61
7.4.330.0000.00415.55
7.4.320.0000.00716.46
7.4.300.0030.00316.46
7.4.290.0080.00016.33
7.4.280.0000.00816.54
7.4.270.0070.00016.54
7.4.260.0000.00613.14
7.4.250.0000.00716.48
7.4.240.0010.00616.55
7.4.230.0030.00316.57
7.4.220.0000.00716.38
7.4.210.0070.00716.52
7.4.200.0030.00316.54
7.4.130.0070.01316.29
7.4.120.0170.00616.34
7.4.110.0100.00616.30
7.4.100.0090.01216.39
7.4.90.0080.00816.51
7.4.80.0120.01219.39
7.4.70.0120.00616.53
7.4.60.0050.01316.41
7.4.50.0090.00616.58
7.4.40.0060.01016.48
7.4.20.0080.00815.99
7.4.10.0120.00416.47
7.4.00.0030.01316.40
7.3.330.0030.00316.23
7.3.320.0040.00412.87
7.3.310.0000.00716.18
7.3.300.0030.00316.13
7.3.290.0050.00315.98
7.3.280.0100.00616.13
7.3.260.0090.00916.58
7.3.230.0120.00616.16
7.3.210.0060.00916.29
7.3.200.0060.01216.04
7.3.190.0060.01116.15
7.3.180.0060.00916.18
7.3.170.0150.00616.32
7.3.160.0090.00616.29
7.3.140.0030.01216.45
7.3.130.0140.00016.24
7.3.120.0120.00316.38
7.3.110.0100.00616.00
7.3.100.0060.01216.13
7.3.90.0060.01316.14
7.3.80.0030.01716.17
7.3.70.0070.01116.22
7.3.60.0140.00616.21
7.3.50.0070.01116.29
7.3.40.0110.00816.14
7.3.30.0030.01516.16
7.3.20.0150.00416.26
7.3.10.0060.00916.12
7.3.00.0060.00916.29
7.2.330.0090.01116.39
7.2.320.0030.01316.56
7.2.310.0100.00716.48
7.2.300.0090.00916.52
7.2.290.0090.00916.23
7.2.270.0060.01216.44
7.2.260.0060.00916.38
7.2.250.0110.00516.26
7.2.240.0040.01116.58
7.2.230.0140.00516.46
7.2.220.0110.00816.54
7.2.210.0100.01016.35
7.2.200.0030.01616.18
7.2.190.0070.01316.36
7.2.180.0100.01016.57
7.2.170.0030.01716.35
7.2.160.0060.01316.30
7.2.150.0100.01016.47
7.2.140.0080.00816.34
7.2.130.0030.01316.35
7.2.120.0070.01116.38
7.2.110.0070.01016.43
7.2.100.0120.00516.34
7.2.90.0070.01516.32
7.2.80.0160.00616.40
7.2.70.0120.00916.33
7.2.60.0180.00316.40
7.2.50.0080.01316.24
7.2.40.0130.00916.53
7.2.30.0110.00416.60
7.2.20.0090.01216.38
7.2.10.0090.00616.39
7.2.00.0090.01216.47

preferences:
150.16 ms | 403 KiB | 5 Q