3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total_pages = 100; $current_page = 50; $boundaries = 2; $around = 2; $arr1 = range(1, $boundaries); $arr2 = range($total_pages - max(($boundaries - 1), 0), $total_pages); $arr3 = range(min($current_page - $around, 1), $current_page); $arr4 = range($current_page, $current_page + $around); $result = array_unique(array_merge($arr1, $arr2, $arr3, $arr4)); sort($result); var_dump($arr1 ); ?>

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.40.0100.00318.67
8.3.30.0030.01018.92
8.3.20.0040.00420.34
8.3.10.0040.00423.52
8.3.00.0040.00421.01
8.2.170.0000.01422.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0030.00619.36
8.2.110.0090.00022.07
8.2.100.0100.00019.36
8.2.90.0040.00419.17
8.2.80.0070.00019.28
8.2.70.0040.00417.63
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0030.00618.03
8.2.30.0070.00017.98
8.2.20.0000.00817.49
8.2.10.0040.00419.91
8.2.00.0040.00417.92
8.1.270.0080.00020.34
8.1.260.0070.00726.35
8.1.250.0070.00028.09
8.1.240.0090.00023.84
8.1.230.0000.01019.07
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0000.00817.53
8.1.180.0000.00720.10
8.1.170.0080.00018.62
8.1.160.0030.00322.24
8.1.150.0070.00018.88
8.1.140.0040.00417.49
8.1.130.0070.00017.79
8.1.120.0040.00417.37
8.1.110.0000.00817.37
8.1.100.0040.00417.26
8.1.90.0030.00517.27
8.1.80.0040.00417.43
8.1.70.0080.00017.37
8.1.60.0040.00417.48
8.1.50.0050.00317.32
8.1.40.0070.00017.42
8.1.30.0000.00817.57
8.1.20.0030.00617.47
8.1.10.0040.00417.39
8.1.00.0040.00417.45
8.0.300.0030.00318.77
8.0.290.0040.00417.05
8.0.280.0050.00318.38
8.0.270.0050.00317.09
8.0.260.0030.00316.75
8.0.250.0030.00316.90
8.0.240.0000.00716.87
8.0.230.0070.00016.84
8.0.220.0070.00016.82
8.0.210.0030.00316.86
8.0.200.0000.00616.79
8.0.190.0030.00716.88
8.0.180.0040.00416.68
8.0.170.0040.00416.88
8.0.160.0000.00716.76
8.0.150.0040.00416.66
8.0.140.0070.00016.77
8.0.130.0000.00613.28
8.0.120.0000.00816.68
8.0.110.0080.00016.82
8.0.100.0070.00016.71
8.0.90.0000.00716.84
8.0.80.0030.01616.87
8.0.70.0040.00416.65
8.0.60.0040.00416.73
8.0.50.0050.00216.76
8.0.30.0060.01116.93
8.0.20.0050.01417.40
8.0.10.0020.00516.89
8.0.00.0100.00816.55
7.4.330.0030.00315.03
7.4.320.0000.00616.42
7.4.300.0030.00316.44
7.4.290.0000.00716.54
7.4.280.0000.00716.32
7.4.270.0050.00316.43
7.4.260.0030.00316.43
7.4.250.0000.00716.27
7.4.240.0040.00316.54
7.4.230.0040.00416.32
7.4.220.0090.01816.56
7.4.210.0100.00716.52
7.4.200.0020.00516.60
7.4.160.0070.00716.40
7.4.150.0090.01117.40
7.4.140.0100.00817.86
7.4.130.0090.01216.36
7.4.120.0080.01116.40
7.4.110.0090.00916.37
7.4.100.0110.01416.53
7.4.90.0030.01516.35
7.4.80.0030.01519.39
7.4.70.0060.01116.55
7.4.60.0130.00316.38
7.4.50.0000.00416.39
7.4.40.0030.01416.47
7.4.30.0100.00716.36
7.4.10.0120.00614.92
7.4.00.0040.01214.78
7.3.330.0000.00613.01
7.3.320.0000.00513.11
7.3.310.0000.00716.29
7.3.300.0000.00716.25
7.3.290.0030.00316.18
7.3.280.0060.01116.15
7.3.270.0080.00917.40
7.3.260.0090.01416.19
7.3.250.0120.00716.39
7.3.240.0050.01116.19
7.3.230.0160.00416.39
7.3.210.0080.00816.34
7.3.200.0090.00916.39
7.3.190.0060.00916.41
7.3.180.0110.00616.54
7.3.170.0150.00016.50
7.3.160.0090.00616.29
7.3.130.0030.01214.95
7.3.120.0080.00914.73
7.3.110.0060.01014.73
7.3.100.0040.01114.74
7.3.90.0090.00614.66
7.3.80.0060.00614.79
7.3.70.0060.00614.58
7.3.60.0050.00914.85
7.3.50.0040.00914.57
7.3.40.0050.00714.67
7.3.30.0060.00514.76
7.3.20.0060.00916.65
7.3.10.0060.01016.55
7.3.00.0070.00616.60
7.2.330.0070.01016.69
7.2.320.0070.01116.42
7.2.310.0100.00716.59
7.2.300.0030.01316.57
7.2.290.0090.00916.64
7.2.260.0070.01014.90
7.2.250.0060.01315.07
7.2.240.0060.01014.93
7.2.230.0080.00814.92
7.2.220.0070.00814.99
7.2.210.0060.00915.04
7.2.200.0060.00614.86
7.2.190.0060.00714.91
7.2.180.0080.00714.93
7.2.170.0060.00614.87
7.2.160.0060.01014.91
7.2.150.0060.00716.74
7.2.140.0030.00916.92
7.2.130.0080.00816.79
7.2.120.0090.00516.61
7.2.110.0040.01116.60
7.2.100.0050.00816.71
7.2.90.0060.00916.90
7.2.80.0050.00816.83
7.2.70.0030.01116.77
7.2.60.0030.01016.89
7.2.50.0080.00816.90
7.2.40.0030.01016.70
7.2.30.0070.00916.74
7.2.20.0050.00716.77
7.2.10.0060.01016.93
7.2.00.0030.01117.51
7.1.330.0040.01015.88
7.1.320.0060.00815.84
7.1.310.0080.00815.68
7.1.300.0050.00815.74
7.1.290.0050.00815.57
7.1.280.0070.00815.67
7.1.270.0040.00915.61
7.1.260.0060.00815.74
7.1.250.0080.00415.84
7.1.240.0060.00315.77
7.1.230.0070.00715.73
7.1.220.0000.01815.77
7.1.210.0040.00815.58
7.1.200.0060.00515.73
7.1.190.0030.00615.46
7.1.180.0100.00715.54
7.1.170.0120.00015.93
7.1.160.0040.00415.83
7.1.150.0000.01315.89
7.1.140.0090.00315.58
7.1.130.0090.00915.90
7.1.120.0070.00715.90
7.1.110.0030.01015.60
7.1.100.0050.00917.07
7.1.90.0030.01015.71
7.1.80.0070.00715.63
7.1.70.0040.00816.48
7.1.60.0030.01617.47
7.1.50.0100.01016.31
7.1.40.0060.00915.74
7.1.30.0060.00615.89
7.1.20.0070.00715.81
7.1.10.0100.00315.83
7.1.00.0050.04019.06
7.0.330.0060.00915.48
7.0.320.0070.00315.32
7.0.310.0030.01015.21
7.0.300.0000.00915.38
7.0.290.0090.00015.38
7.0.280.0060.01215.16
7.0.270.0030.01415.43
7.0.260.0040.00815.57
7.0.250.0040.01115.53
7.0.240.0130.00315.41
7.0.230.0040.00715.29
7.0.220.0030.00715.47
7.0.210.0040.00815.47
7.0.200.0070.01015.18
7.0.190.0070.00715.27
7.0.180.0000.01415.15
7.0.170.0070.01015.19
7.0.160.0070.01015.35
7.0.150.0030.00915.45
7.0.140.0090.00315.06
7.0.130.0120.00315.52
7.0.120.0030.01115.22
7.0.110.0080.00815.45
7.0.100.0070.00715.13
7.0.90.0040.00815.21
7.0.80.0030.00915.57
7.0.70.0100.00315.45
7.0.60.0030.04817.55
7.0.50.0080.04316.63
7.0.40.0100.04316.74
7.0.30.0290.03316.58
7.0.20.0150.02116.82
7.0.10.0110.03916.73
7.0.00.0100.04216.74
5.6.400.0030.00714.46
5.6.390.0000.00913.80
5.6.380.0000.01514.27
5.6.370.0070.00714.53
5.6.360.0030.01214.30
5.6.350.0100.00314.19
5.6.340.0070.00714.47
5.6.330.0070.01014.55
5.6.320.0060.00913.80
5.6.310.0000.01714.39
5.6.300.0040.01113.94
5.6.290.0040.00814.38
5.6.280.0000.04517.65
5.6.270.0100.00014.38
5.6.260.0090.00614.14
5.6.250.0030.01014.14
5.6.240.0030.00614.48
5.6.230.0030.01014.20
5.6.220.0030.00614.46
5.6.210.0020.03817.43
5.6.200.0030.02616.30
5.6.190.0050.02517.33
5.6.180.2070.02317.23
5.6.170.0130.02217.46
5.6.160.0050.04617.20
5.6.150.0130.04016.15
5.6.140.0030.02516.13
5.6.130.0150.03816.16
5.6.120.0020.03417.72
5.6.110.0000.05117.69
5.6.100.0110.04117.63
5.6.90.0050.04817.72
5.6.80.0100.04017.29
5.6.70.2290.02017.26
5.6.60.0070.00714.10
5.6.50.0090.00614.23
5.6.40.0100.00614.37
5.6.30.0070.00713.87
5.6.20.0030.01014.04
5.6.10.0030.00914.10
5.6.00.0070.01014.18
5.5.380.0000.01214.04
5.5.370.0090.00614.13
5.5.360.0000.01014.27
5.5.350.0060.04017.41
5.5.340.0070.02816.08
5.5.330.0090.04417.19
5.5.320.0220.03817.08
5.5.310.0190.04017.40
5.5.300.0050.03216.03
5.5.290.0100.04216.03
5.5.280.0050.04517.67
5.5.270.0050.03217.52
5.5.260.0090.01817.36
5.5.250.0000.03417.37
5.5.240.0100.03917.10
5.5.230.0100.00314.18
5.5.220.0070.00314.01
5.5.210.0070.00614.20
5.5.200.0070.00714.05
5.5.190.0000.01414.48
5.5.180.0110.00414.37
5.5.170.0080.00414.33
5.5.160.0000.01114.17
5.5.150.0070.01014.36
5.5.140.0070.01013.74
5.5.130.0100.00614.23
5.5.120.0050.00514.21
5.5.110.0100.00013.77
5.5.100.0040.01214.04
5.5.90.0080.00814.18
5.5.80.0060.00314.21
5.5.70.0000.00914.12
5.5.60.0090.00413.95
5.5.50.0040.00414.24
5.5.40.0110.00313.95
5.5.30.0070.00714.21
5.5.20.0040.01213.97
5.5.10.0000.00814.39
5.5.00.0000.01213.73
5.4.450.0220.02815.19
5.4.440.0420.03215.01
5.4.430.0050.03515.03
5.4.420.0100.02715.38
5.4.410.0090.03215.21
5.4.400.0150.02114.96
5.4.390.0030.03114.98
5.4.380.0110.02314.77
5.4.370.0050.02915.06
5.4.360.0020.03514.84
5.4.350.0020.03614.87
5.4.340.0030.03315.03
5.4.330.0100.00310.97
5.4.320.0050.03314.99
5.4.310.0100.03114.93
5.4.300.0040.03114.99
5.4.290.0030.03214.98
5.4.280.0080.02714.98
5.4.270.0110.02615.03
5.4.260.0090.02614.84
5.4.250.0050.03315.05
5.4.240.0150.02314.98
5.4.230.0090.02815.02
5.4.220.0120.03715.09
5.4.210.0070.03215.06
5.4.200.0050.03113.72
5.4.190.0030.03315.06
5.4.180.0100.03015.04
5.4.170.0130.03014.82
5.4.160.0030.03015.00
5.4.150.0100.02815.05
5.4.140.0070.02913.50
5.4.130.0050.03213.65
5.4.120.0090.02513.74
5.4.110.0060.02713.70
5.4.100.0070.02713.58
5.4.90.0050.03313.56
5.4.80.0070.02613.61
5.4.70.0050.02713.60
5.4.60.0050.02813.63
5.4.50.0070.02613.54
5.4.40.0100.02613.51
5.4.30.0070.02713.51
5.4.20.0090.02813.53
5.4.10.0110.02313.66
5.4.00.0020.03413.47
5.3.290.0100.05014.56
5.3.280.0100.05014.50
5.3.270.0170.04714.56
5.3.260.0100.05014.48
5.3.250.0070.05314.52
5.3.240.0030.06014.65
5.3.230.0000.06014.53
5.3.220.0130.04714.48
5.3.210.0030.06014.59
5.3.200.0100.05014.54
5.3.190.0130.05014.48
5.3.180.0070.05014.50
5.3.170.0000.06014.47
5.3.160.0130.04714.42
5.3.150.0130.05014.58
5.3.140.0200.03714.36
5.3.130.0170.04714.35
5.3.120.0230.03714.49
5.3.110.0170.04714.40
5.3.100.0030.05714.04
5.3.90.0000.05714.02
5.3.80.0200.04713.96
5.3.70.0200.04713.92
5.3.60.0130.04714.05
5.3.50.0070.05313.82
5.3.40.0070.05013.86
5.3.30.0130.05013.84
5.3.20.0130.05713.73
5.3.10.0100.04713.62
5.3.00.0030.05313.60
5.2.170.0100.03711.01
5.2.160.0030.04710.95
5.2.150.0030.04311.02
5.2.140.0100.03711.08
5.2.130.0070.04311.02
5.2.120.0070.04010.96
5.2.110.0130.03310.92
5.2.100.0130.03310.97
5.2.90.0130.04711.02
5.2.80.0100.04011.17
5.2.70.0070.04010.95
5.2.60.0030.04710.96
5.2.50.0100.04010.97
5.2.40.0070.04010.86
5.2.30.0130.03710.90
5.2.20.0100.03710.97
5.2.10.0130.03310.79
5.2.00.0070.04010.66
5.1.60.0100.03010.15
5.1.50.0030.03710.16
5.1.40.0030.0379.92
5.1.30.0030.03710.40
5.1.20.0030.04010.37
5.1.10.0030.03710.01
5.1.00.0000.04710.00
5.0.50.0030.0338.41
5.0.40.0070.0238.59
5.0.30.0030.0538.35
5.0.20.0030.0308.11
5.0.10.0000.0338.28
5.0.00.0000.0478.18
4.4.90.0000.0275.78
4.4.80.0070.0205.86
4.4.70.0000.0235.86
4.4.60.0070.0175.84
4.4.50.0000.0235.80
4.4.40.0030.0335.87
4.4.30.0000.0235.84
4.4.20.0000.0235.96
4.4.10.0070.0175.90
4.4.00.0030.0335.92
4.3.110.0030.0235.81
4.3.100.0000.0235.86
4.3.90.0070.0205.78
4.3.80.0000.0375.79
4.3.70.0030.0205.70
4.3.60.0000.0235.82
4.3.50.0030.0235.75
4.3.40.0000.0375.79
4.3.30.0030.0204.60
4.3.20.0000.0234.45
4.3.10.0070.0174.51
4.3.00.0130.0237.06

preferences:
45.2 ms | 400 KiB | 5 Q