3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* http://3v4l.org/DCTnA */ /* < [1] 2 3 ... 22 23 > < 1 [2] 3 ... 22 23 > < 1 2 [3] 4 ... 22 23 > < 1 2 3 [4] 5 ... 22 23 > < 1 2 ... 4 [5] 6 ... 22 23 > < 1 2 ... 5 [6] 7 ... 22 23 > ... < 1 2 ... 18 [19] 20 ... 22 23 > */ $currentpageid = $nmstart = 2; $nrtotal = 23; $nrposts = 1; $pages = ''; $ssPagingStartCount = 3; $ssPagingCurrentCount = 3; $ssPagingEndCount = 2; $totalpages = ceil($nrtotal / $nrposts); if ($totalpages > 1 ){ /* for ($x = 0; $x < $totalpages; ++$x) { $inc = $x * $nrposts; $display = $x + 1; if($inc != $nmstart) { $pages .= "\n<a class=\"nl_page\" href='" . "nmstart=$inc'>".$display."</a>"; } else { $pages .= "\n<span class=\"nl_page nl_page__currentpage\">".$display."</span>"; } } */ if ( ($currentpageid >= 0) && ($currentpageid < $ssPagingStartCount) ) { //$ssPagingCurrentCountRight = max($ssPagingStartCount, ($currentpageid + (int)($ssPagingCurrentCount/2))); $ssPagingCurrentCountFrom = $currentpageid - (int)($ssPagingCurrentCount/2); if ( $ssPagingCurrentCountFrom < 0 ) $ssPagingCurrentCountFrom = 0; $ssPagingCurrentCountTo = $currentpageid + (int)($ssPagingCurrentCount/2); if ( $ssPagingCurrentCountTo > $totalpages ) $ssPagingCurrentCountTo = $totalpages; for ($x = $ssPagingCurrentCountFrom; $x < $ssPagingCurrentCountTo; ++$x) { $inc = $x * $nrposts; $display = $x + 1; if ($inc != $nmstart) { $pages .= "\n<a class=\"nl_page\" href='" . "nmstart=$inc'>".$display."</a>"; } else { $pages .= "\n<span class=\"nl_page nl_page__currentpage\">".$display."</span>"; } } } } var_dump($pages); ?>

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.0120.00916.75
8.3.50.0150.00622.00
8.3.40.0110.00718.71
8.3.30.0110.00319.23
8.3.20.0040.00420.18
8.3.10.0120.00621.68
8.3.00.0050.00319.38
8.2.180.0070.00716.50
8.2.170.0030.01822.96
8.2.160.0070.01420.44
8.2.150.0090.00924.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00019.79
8.2.110.0060.00321.12
8.2.100.0130.00017.84
8.2.90.0040.00417.63
8.2.80.0040.00418.85
8.2.70.0080.00018.05
8.2.60.0000.00818.03
8.2.50.0000.00918.10
8.2.40.0000.00720.19
8.2.30.0040.00420.53
8.2.20.0000.00817.77
8.2.10.0050.00218.03
8.2.00.0040.00417.64
8.1.280.0040.01825.92
8.1.270.0040.00420.61
8.1.260.0020.00526.35
8.1.250.0070.00028.09
8.1.240.0000.00823.88
8.1.230.0060.00622.72
8.1.220.0050.00317.77
8.1.210.0040.00418.77
8.1.200.0090.00017.36
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0060.00318.68
8.1.160.0030.00322.20
8.1.150.0000.00718.96
8.1.140.0040.00417.38
8.1.130.0030.00317.90
8.1.120.0000.00717.50
8.1.110.0050.00317.41
8.1.100.0030.00317.48
8.1.90.0000.00717.37
8.1.80.0000.00817.38
8.1.70.0030.00517.53
8.1.60.0040.00417.59
8.1.50.0050.00217.47
8.1.40.0000.00717.44
8.1.30.0080.00017.58
8.1.20.0060.00317.67
8.1.10.0000.01017.41
8.1.00.0030.00617.48
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0040.00418.38
8.0.270.0080.00017.18
8.0.260.0030.00317.19
8.0.250.0000.00716.88
8.0.240.0030.00317.05
8.0.230.0030.00317.01
8.0.220.0000.00716.93
8.0.210.0030.00316.90
8.0.200.0030.00316.99
8.0.190.0040.00416.92
8.0.180.0040.00416.87
8.0.170.0050.00216.83
8.0.160.0040.00416.88
8.0.150.0050.00316.89
8.0.140.0000.00716.78
8.0.130.0030.00313.37
8.0.120.0000.00816.87
8.0.110.0000.00816.90
8.0.100.0080.00016.90
8.0.90.0030.00516.80
8.0.80.0090.00616.93
8.0.70.0040.00416.75
8.0.60.0000.00716.90
8.0.50.0000.00716.91
8.0.30.0120.01117.09
8.0.20.0130.00917.40
8.0.10.0050.00316.98
8.0.00.0110.00816.80
7.4.330.0030.00315.03
7.4.320.0040.00416.58
7.4.300.0000.00816.60
7.4.290.0000.00816.38
7.4.280.0000.00716.42
7.4.270.0000.00716.64
7.4.260.0030.00316.52
7.4.250.0000.00816.56
7.4.240.0040.00316.48
7.4.230.0000.00716.52
7.4.220.0030.01416.69
7.4.210.0120.00316.51
7.4.200.0030.00316.67
7.4.160.0160.00016.62
7.4.150.0120.01517.40
7.4.140.0130.00417.86
7.4.130.0110.00616.50
7.4.120.0120.00716.48
7.4.110.0110.01116.59
7.4.100.0100.01316.66
7.4.90.0100.01016.36
7.4.80.0150.00919.39
7.4.70.0100.01316.43
7.4.60.0060.00916.60
7.4.50.0030.00516.46
7.4.40.0150.00416.66
7.4.30.0130.00616.57
7.4.00.0060.01014.83
7.3.330.0060.00013.17
7.3.320.0070.00713.27
7.3.310.0070.00016.33
7.3.300.0030.00316.32
7.3.290.0020.01216.35
7.3.280.0080.00916.32
7.3.270.0030.01517.40
7.3.260.0110.00916.54
7.3.250.0150.00516.39
7.3.240.0100.00516.40
7.3.230.0130.01016.41
7.3.210.0030.01416.39
7.3.200.0030.01319.39
7.3.190.0120.00616.35
7.3.180.0120.00916.65
7.3.170.0100.01116.45
7.3.160.0130.00316.61
7.3.10.0110.00416.39
7.3.00.0060.01216.72
7.2.330.0080.01016.62
7.2.320.0150.00816.72
7.2.310.0070.01116.54
7.2.300.0110.00716.76
7.2.290.0160.00616.71
7.2.130.0100.00316.95
7.2.120.0150.00017.00
7.2.110.0040.01417.04
7.2.100.0000.01116.95
7.2.90.0080.00816.86
7.2.80.0040.01116.65
7.2.70.0040.00416.77
7.2.60.0060.00916.94
7.2.50.0080.00516.79
7.2.40.0030.01316.64
7.2.30.0090.01117.03
7.2.20.0070.01116.71
7.2.10.0060.00916.93
7.2.00.0070.00718.07
7.1.250.0070.00715.60
7.1.200.0180.00415.93
7.1.100.0000.01218.31
7.1.70.0060.00917.09
7.1.60.0130.01019.46
7.1.50.0210.00334.85
7.1.00.0030.07722.34
7.0.200.0000.00716.52
7.0.140.0100.02722.18
7.0.60.0100.06719.92
7.0.50.0100.07017.67
7.0.40.0100.06720.39
7.0.30.0270.07720.09
7.0.20.0170.04720.04
7.0.10.0330.07720.17
7.0.00.0130.07720.29
5.6.280.0030.07320.86
5.6.210.0100.08020.50
5.6.200.0100.08018.08
5.6.190.0200.08020.43
5.6.180.0200.03720.23
5.6.170.0270.06320.48
5.6.160.0070.08320.61
5.6.150.0030.04018.16
5.6.140.0170.06018.13
5.6.130.0030.05318.12
5.6.120.0100.08021.00
5.6.110.0030.08720.88
5.6.100.0170.06020.97
5.6.90.0070.08020.96
5.6.80.0130.08320.38
5.6.70.0100.06020.27
5.5.350.0030.09320.40
5.5.340.0130.07717.98
5.5.330.0030.07720.46
5.5.320.0030.06720.07
5.5.310.0330.05320.24
5.5.300.0030.08017.87
5.5.290.0070.08318.01
5.5.280.0070.06720.77
5.5.270.0100.08720.68
5.5.260.0130.04320.88
5.5.250.0100.03720.68
5.5.240.0170.07020.11
5.4.450.0630.05719.57
5.4.440.0270.04719.29
5.4.430.0330.05719.63
5.4.420.0170.05019.48
5.4.410.0230.04319.32
5.4.400.0770.05318.63
5.4.390.0800.04318.59
5.4.380.0870.05318.56
5.4.370.0830.04318.56
5.4.360.0770.05018.60
5.4.350.0670.06018.77
5.4.340.0800.04718.72
5.4.320.0770.05718.49
5.4.310.0800.04318.59
5.4.300.0800.05318.50
5.4.290.0830.05318.71
5.4.280.0700.06018.56
5.4.270.0800.04318.71
5.4.260.0730.05318.67
5.4.250.0700.06718.78
5.4.240.0770.05318.63
5.4.230.0900.05318.76
5.4.220.0870.06018.64
5.4.210.1070.04718.48
5.4.200.0800.05016.63
5.4.190.0730.05318.70
5.4.180.0830.05018.70
5.4.170.0800.05018.57
5.4.160.0770.05018.76
5.4.150.0770.05018.63
5.4.140.0730.05316.05
5.4.130.0770.04716.23
5.4.120.0670.05316.13
5.4.110.0830.06716.32
5.4.100.0800.05016.17
5.4.90.0800.04316.05
5.4.80.0700.05016.25
5.4.70.0930.05016.07
5.4.60.0900.05016.04
5.4.50.0930.04316.02
5.4.40.0730.05016.14
5.4.30.0770.05016.16
5.4.20.0730.05016.23
5.4.10.0770.04716.19
5.4.00.0730.04715.71
5.3.290.0700.06014.67
5.3.280.0830.05014.55
5.3.270.0830.04314.63
5.3.260.0670.05714.58
5.3.250.0800.05314.64
5.3.240.0700.06014.61
5.3.230.0700.05314.49
5.3.220.0800.05314.57
5.3.210.0870.04314.57
5.3.200.0730.05014.55
5.3.190.0770.04714.66
5.3.180.0730.05314.49
5.3.170.0830.04314.54
5.3.160.0770.05314.55
5.3.150.0770.05014.59
5.3.140.0700.06014.50
5.3.130.0730.05714.46
5.3.120.0730.05314.54
5.3.110.0970.05314.61
5.3.100.0930.05313.98
5.3.90.0870.05013.98
5.3.80.0770.05313.98
5.3.70.0800.04714.05
5.3.60.0030.05713.98
5.3.50.0100.05013.93
5.3.40.0070.05313.93
5.3.30.0500.04013.82
5.3.20.0800.05713.69
5.3.10.0900.04713.64
5.3.00.1000.05013.57
5.2.170.0530.04711.19
5.2.160.0630.04011.11
5.2.150.0770.03711.18
5.2.140.0870.05011.13
5.2.130.0870.04011.16
5.2.120.0700.04011.07
5.2.110.0500.05011.16
5.2.100.0730.04311.09
5.2.90.0770.03311.10
5.2.80.0570.04311.26
5.2.70.0700.04311.06
5.2.60.0870.05711.03
5.2.50.0800.03711.00
5.2.40.0600.03710.92
5.2.30.0570.05011.04
5.2.20.0570.04010.93
5.2.10.0630.03710.86
5.2.00.0500.04010.77
5.1.60.0570.02310.18
5.1.50.0570.03310.10
5.1.40.0570.03310.18
5.1.30.0670.04010.40
5.1.20.0470.03710.41
5.1.10.0500.03310.13
5.1.00.0470.03710.17
5.0.50.0230.0308.69
5.0.40.0230.0408.56
5.0.30.0300.0508.28
5.0.20.0270.0278.41
5.0.10.0330.0338.20
5.0.00.0230.0438.16
4.4.90.0330.0135.99
4.4.80.0330.0205.89
4.4.70.0230.0235.91
4.4.60.0200.0276.00
4.4.50.0270.0205.89
4.4.40.0270.0305.90
4.4.30.0270.0205.92
4.4.20.0230.0236.06
4.4.10.0230.0236.00
4.4.00.0230.0405.95
4.3.110.0230.0205.78
4.3.100.0300.0175.76
4.3.90.0230.0235.84
4.3.80.0200.0375.80
4.3.70.0230.0205.93
4.3.60.0230.0205.81
4.3.50.0230.0235.89
4.3.40.0300.0275.78
4.3.30.0170.0204.69
4.3.20.0170.0204.58
4.3.10.0130.0274.60
4.3.00.0070.0277.02

preferences:
46.23 ms | 401 KiB | 5 Q