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 > < 1 2 ... 19 [20] 21 22 23 > < 1 2 ... 20 [21] 22 23 > < 1 2 ... 21 [22] 23 > < 1 2 ... 22 [23] > */ $currentpageid = $nmstart = 2; $nrtotal = 23; $nrposts = 1; $pages = ''; $ssPagingStartCount = 2; $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>"; } } */ //$ssPagingCurrentCountRight = max($ssPagingStartCount, ($currentpageid + (int)($ssPagingCurrentCount/2))); $ssPagingCurrentCountFrom = $currentpageid - (int)($ssPagingCurrentCount/2) - 1; if ( $ssPagingCurrentCountFrom < 0 ) $ssPagingCurrentCountFrom = 0; $ssPagingCurrentCountTo = $currentpageid + (int)($ssPagingCurrentCount/2) + 1; if ( $ssPagingCurrentCountTo > $totalpages ) $ssPagingCurrentCountTo = $totalpages; if ( ($currentpageid >= 0) && ($currentpageid <= ($ssPagingStartCount + (int)($ssPagingCurrentCount/2))) ) { for ($x = 0; $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.70.0150.00716.63
8.3.60.0150.00716.75
8.3.50.0120.00922.01
8.3.40.0170.00318.89
8.3.30.0090.00919.13
8.3.20.0000.00720.34
8.3.10.0050.00221.75
8.3.00.0040.00419.22
8.2.180.0090.01216.50
8.2.170.0160.00322.96
8.2.160.0150.00420.47
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00719.66
8.2.110.0060.00321.00
8.2.100.0070.00417.63
8.2.90.0090.00019.36
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00718.16
8.2.50.0050.00318.07
8.2.40.0030.00620.07
8.2.30.0040.00418.22
8.2.20.0000.00717.89
8.2.10.0040.00418.05
8.2.00.0000.00717.77
8.1.280.0140.00425.92
8.1.270.0190.00020.61
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00023.97
8.1.230.0060.00618.72
8.1.220.0040.00417.80
8.1.210.0030.00618.77
8.1.200.0030.00617.36
8.1.190.0030.00517.25
8.1.180.0050.00218.10
8.1.170.0030.00520.44
8.1.160.0000.00721.91
8.1.150.0000.00718.79
8.1.140.0000.00817.48
8.1.130.0040.00417.80
8.1.120.0000.00717.48
8.1.110.0070.00017.45
8.1.100.0030.00517.46
8.1.90.0000.00717.45
8.1.80.0070.00017.46
8.1.70.0000.00717.52
8.1.60.0040.00417.45
8.1.50.0040.00417.55
8.1.40.0000.00717.51
8.1.30.0030.00617.69
8.1.20.0040.00417.59
8.1.10.0000.00717.47
8.1.00.0070.00017.50
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0030.00318.40
8.0.270.0030.00617.10
8.0.260.0070.00017.25
8.0.250.0000.00716.90
8.0.240.0030.00316.97
8.0.230.0070.00017.00
8.0.220.0030.00316.95
8.0.210.0000.00716.89
8.0.200.0000.00716.95
8.0.190.0040.00416.98
8.0.180.0040.00416.93
8.0.170.0040.00416.90
8.0.160.0030.00316.86
8.0.150.0050.00216.81
8.0.140.0040.00416.86
8.0.130.0050.00313.30
8.0.120.0040.00416.89
8.0.110.0040.00416.84
8.0.100.0000.00716.95
8.0.90.0050.00316.96
8.0.80.0110.00916.80
8.0.70.0000.00816.79
8.0.60.0000.00716.80
8.0.50.0000.00716.95
8.0.30.0040.01717.17
8.0.20.0090.01017.40
8.0.10.0070.00016.93
8.0.00.0120.00516.79
7.4.330.0050.00015.16
7.4.320.0000.00716.54
7.4.300.0090.00016.39
7.4.290.0000.00716.63
7.4.280.0000.00816.63
7.4.270.0060.00316.67
7.4.260.0030.00316.54
7.4.250.0040.00416.58
7.4.240.0040.00316.58
7.4.230.0030.00316.33
7.4.220.0040.01316.43
7.4.210.0100.00316.67
7.4.200.0000.00716.60
7.4.160.0040.01116.32
7.4.150.0100.00717.40
7.4.140.0080.01117.86
7.4.130.0070.01016.49
7.4.120.0090.00916.54
7.4.110.0130.00416.61
7.4.100.0030.02016.43
7.4.90.0040.01416.48
7.4.80.0090.00919.39
7.4.70.0080.01216.53
7.4.60.0130.00316.61
7.4.50.0050.00016.52
7.4.40.0100.00716.58
7.4.30.0110.01416.60
7.4.00.0070.00914.96
7.3.330.0050.00013.15
7.3.320.0110.00413.27
7.3.310.0000.00916.34
7.3.300.0000.00616.35
7.3.290.0100.00716.38
7.3.280.0140.00416.36
7.3.270.0030.01617.40
7.3.260.0090.00816.31
7.3.250.0120.00716.28
7.3.240.0120.00816.29
7.3.230.0140.00916.39
7.3.210.0080.00816.35
7.3.200.0190.00019.39
7.3.190.0040.01216.32
7.3.180.0060.01016.50
7.3.170.0100.01316.58
7.3.160.0000.01616.31
7.3.120.0060.00914.80
7.3.110.0140.00014.91
7.3.100.0100.00315.09
7.3.90.0080.00814.79
7.3.80.0000.01415.06
7.3.70.0000.01414.87
7.3.60.0100.00614.87
7.3.50.0030.00914.63
7.3.40.0030.01014.98
7.3.30.0070.00714.82
7.3.20.0100.00716.87
7.3.10.0060.00916.73
7.3.00.0140.00016.48
7.2.330.0140.00916.72
7.2.320.0100.01316.68
7.2.310.0100.00716.46
7.2.300.0030.01916.57
7.2.290.0070.01016.63
7.2.250.0060.01215.19
7.2.240.0090.00915.24
7.2.230.0000.01015.10
7.2.220.0120.00415.06
7.2.210.0070.01114.90
7.2.200.0000.01415.15
7.2.190.0110.00615.03
7.2.180.0030.01015.16
7.2.170.0110.00715.18
7.1.330.0040.00815.48
7.1.320.0040.01115.88
7.1.310.0070.01015.86
7.1.300.0030.01315.86
7.1.290.0030.00915.80
7.1.280.0100.00315.58
7.1.270.0060.00916.03
7.1.260.0110.00415.88
7.1.100.0060.00818.06
7.1.70.0000.01117.32
7.1.60.0100.01419.46
7.1.50.0220.00634.92
7.1.00.0100.07022.45
7.0.200.0060.00616.82
7.0.140.0000.03722.09
7.0.60.0070.07019.91
7.0.50.0100.06317.91
7.0.40.0100.06320.12
7.0.30.0300.04019.96
7.0.20.0170.05320.09
7.0.10.0170.05020.04
7.0.00.0070.04019.99
5.6.280.0030.07321.07
5.6.210.0030.08720.77
5.6.200.0100.07318.11
5.6.190.0070.08020.47
5.6.180.0230.04720.47
5.6.170.0300.07020.49
5.6.160.0070.08320.46
5.6.150.0030.04018.09
5.6.140.0130.07318.18
5.6.130.0030.04018.20
5.6.120.0000.04721.02
5.6.110.0070.07321.00
5.6.100.0100.05321.04
5.6.90.0170.08020.88
5.6.80.0100.06320.36
5.6.70.4470.04720.35
5.5.350.0000.08720.42
5.5.340.0030.04017.96
5.5.330.0070.04020.37
5.5.320.0270.06720.24
5.5.310.0170.07020.16
5.5.300.0030.08717.95
5.5.290.0100.08017.98
5.5.280.0030.08720.88
5.5.270.0130.08020.69
5.5.260.0170.04020.77
5.5.250.0030.09020.71
5.5.240.0100.07720.28
5.4.450.0600.05319.60
5.4.440.0200.05019.53
5.4.430.0200.05319.26
5.4.420.0100.05719.51
5.4.410.0200.05319.47
5.4.400.0830.04318.83
5.4.390.0770.05718.74
5.4.380.0800.05318.48
5.4.370.0700.06018.69
5.4.360.0570.04318.67
5.4.350.0030.06018.74
5.4.340.0030.06318.78
5.4.320.0030.06718.77
5.4.310.0670.06018.56
5.4.300.0630.06318.77
5.4.290.0830.05018.56
5.4.280.0700.05718.71
5.4.270.0730.05718.50
5.4.260.0800.04318.66
5.4.250.0730.05318.47
5.4.240.0830.05018.60
5.4.230.0770.04718.65
5.4.220.0630.06718.54
5.4.210.0700.05718.57
5.4.200.0800.04316.74
5.4.190.1000.06018.68
5.4.180.0830.05018.67
5.4.170.0800.04718.45
5.4.160.0700.06018.64
5.4.150.0770.05718.66
5.4.140.0730.04716.09
5.4.130.0700.05316.24
5.4.120.1000.05016.07
5.4.110.1000.03716.15
5.4.100.0900.05016.20
5.4.90.0900.05016.14
5.4.80.0970.05716.24
5.4.70.0730.05016.34
5.4.60.0730.05016.13
5.4.50.0800.05316.12
5.4.40.0700.05316.05
5.4.30.0770.06016.18
5.4.20.0800.06016.18
5.4.10.0630.05716.24
5.4.00.0770.04715.72
5.3.290.0870.06314.62
5.3.280.0970.06014.53
5.3.270.1030.04014.52
5.3.260.0900.05014.61
5.3.250.1170.05014.53
5.3.240.0870.05314.71
5.3.230.0870.05714.58
5.3.220.1030.05014.57
5.3.210.0970.04314.67
5.3.200.1070.05714.47
5.3.190.1070.04714.67
5.3.180.0900.05014.66
5.3.170.0900.05314.69
5.3.160.1100.04014.55
5.3.150.0870.05314.57
5.3.140.0830.05314.54
5.3.130.1000.05014.45
5.3.120.0900.04714.53
5.3.110.0970.04714.46
5.3.100.0930.04714.02
5.3.90.0970.06714.10
5.3.80.0900.05313.96
5.3.70.0800.04314.00
5.3.60.0700.05713.99
5.3.50.0700.05013.90
5.3.40.1000.05313.91
5.3.30.0800.05313.91
5.3.20.0830.05713.69
5.3.10.0870.05013.61
5.3.00.0870.05013.59
5.2.170.0770.04711.11
5.2.160.0700.04311.07
5.2.150.0600.04011.16
5.2.140.0570.04311.12
5.2.130.0770.04711.15
5.2.120.0630.04711.15
5.2.110.0670.04711.10
5.2.100.0730.03711.15
5.2.90.0800.03011.27
5.2.80.0830.03011.14
5.2.70.0700.04711.06
5.2.60.0730.04311.05
5.2.50.0800.04711.08
5.2.40.0570.04011.02
5.2.30.0630.03711.04
5.2.20.0630.04010.90
5.2.10.0630.03711.07
5.2.00.0700.03010.77
5.1.60.0570.04010.23
5.1.50.0600.04010.03
5.1.40.0630.03010.09
5.1.30.0430.04010.32
5.1.20.0530.03310.34
5.1.10.0600.03710.21
5.1.00.0630.03310.16
5.0.50.0230.0378.75
5.0.40.0370.0238.55
5.0.30.0330.0478.44
5.0.20.0230.0338.38
5.0.10.0270.0278.21
5.0.00.0330.0408.24
4.4.90.0230.0275.91
4.4.80.0370.0175.88
4.4.70.0370.0135.89
4.4.60.0270.0235.93
4.4.50.0370.0205.92
4.4.40.0330.0375.93
4.4.30.0270.0235.96
4.4.20.0270.0335.94
4.4.10.0330.0176.00
4.4.00.0300.0335.95
4.3.110.0230.0275.86
4.3.100.0230.0275.77
4.3.90.0300.0205.80
4.3.80.0270.0375.83
4.3.70.0300.0205.80
4.3.60.0300.0205.80
4.3.50.0330.0205.83
4.3.40.0270.0375.76
4.3.30.0200.0174.60
4.3.20.0130.0234.57
4.3.10.0200.0234.50
4.3.00.0130.0177.02

preferences:
60.22 ms | 401 KiB | 5 Q