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 = 1; for ($ss = -1; $ss<10; ++$ss){ echo "\n"; echo "\n"; echo "\n"; echo '-----------------'; echo "\n"; var_dump($ss); echo "\n"; $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.60.0150.00616.63
8.3.50.0070.01322.13
8.3.40.0110.00418.67
8.3.30.0070.01119.17
8.3.20.0000.00720.38
8.3.10.0070.00021.91
8.3.00.0040.00419.25
8.2.180.0140.00718.54
8.2.170.0180.00422.96
8.2.160.0030.01022.11
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00019.73
8.2.110.0090.00021.15
8.2.100.0140.00017.63
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0040.00420.07
8.2.30.0000.00818.19
8.2.20.0000.00817.81
8.2.10.0080.00018.18
8.2.00.0040.00417.63
8.1.280.0130.01025.92
8.1.270.0000.00920.48
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0090.00023.79
8.1.230.0070.00318.78
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0040.00417.36
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00420.42
8.1.160.0040.00421.94
8.1.150.0080.00018.86
8.1.140.0000.00817.47
8.1.130.0050.00217.82
8.1.120.0040.00417.52
8.1.110.0040.00417.30
8.1.100.0040.00417.47
8.1.90.0040.00417.45
8.1.80.0000.00717.41
8.1.70.0000.00717.46
8.1.60.0030.00617.67
8.1.50.0000.00917.50
8.1.40.0040.00417.43
8.1.30.0030.00617.70
8.1.20.0000.00817.65
8.1.10.0000.00717.34
8.1.00.0020.00517.43
8.0.300.0080.00018.77
8.0.290.0040.00416.63
8.0.280.0040.00418.47
8.0.270.0040.00417.27
8.0.260.0000.00717.14
8.0.250.0000.00716.88
8.0.240.0070.00017.03
8.0.230.0030.00516.96
8.0.220.0000.00716.95
8.0.210.0000.00716.81
8.0.200.0040.00416.93
8.0.190.0040.00416.93
8.0.180.0000.00716.89
8.0.170.0000.00816.80
8.0.160.0070.00016.94
8.0.150.0040.00416.87
8.0.140.0000.00716.75
8.0.130.0070.00013.29
8.0.120.0000.00916.88
8.0.110.0040.00416.88
8.0.100.0040.00416.72
8.0.90.0020.00516.81
8.0.80.0110.00816.82
8.0.70.0040.00416.97
8.0.60.0000.00716.86
8.0.50.0040.00416.92
8.0.30.0070.01217.03
8.0.20.0180.00517.40
8.0.10.0000.00816.88
8.0.00.0130.00416.64
7.4.330.0050.00015.15
7.4.320.0000.00616.61
7.4.300.0000.00916.52
7.4.290.0070.00016.70
7.4.280.0030.00316.56
7.4.270.0030.00316.63
7.4.260.0070.00016.47
7.4.250.0050.00216.38
7.4.240.0040.00416.57
7.4.230.0070.00016.55
7.4.220.0190.00316.58
7.4.210.0090.00516.52
7.4.200.0040.00416.64
7.4.160.0100.00716.39
7.4.150.0120.00617.40
7.4.140.0090.01317.86
7.4.130.0120.00516.62
7.4.120.0110.00816.53
7.4.110.0040.01816.51
7.4.100.0070.01316.41
7.4.90.0110.00716.69
7.4.80.0090.00919.39
7.4.70.0060.01216.65
7.4.60.0070.01016.53
7.4.50.0060.00316.38
7.4.40.0120.00616.34
7.4.30.0090.01116.61
7.4.00.0060.01014.74
7.3.330.0030.00313.19
7.3.320.0130.00413.24
7.3.310.0080.00016.28
7.3.300.0030.00316.36
7.3.290.0030.00316.28
7.3.280.0090.01016.36
7.3.270.0070.01117.40
7.3.260.0120.00616.54
7.3.250.0120.00916.51
7.3.240.0080.00816.50
7.3.230.0100.01416.43
7.3.210.0030.01516.56
7.3.200.0130.01019.39
7.3.190.0100.00716.72
7.3.180.0120.00916.25
7.3.170.0100.01016.67
7.3.160.0110.00616.41
7.3.120.0060.00914.71
7.3.110.0090.00614.98
7.3.100.0040.00714.84
7.3.90.0060.00914.73
7.3.80.0040.01115.14
7.3.70.0070.00714.89
7.3.60.0060.00614.91
7.3.50.0000.01514.57
7.3.40.0080.00814.81
7.3.30.0030.00614.84
7.3.20.0070.00716.32
7.3.10.0070.00716.80
7.3.00.0080.00916.49
7.2.330.0120.00616.59
7.2.320.0060.01216.79
7.2.310.0080.01216.58
7.2.300.0190.00316.77
7.2.290.0140.00916.81
7.2.240.0070.00715.14
7.2.230.0110.00715.13
7.2.220.0060.00914.63
7.2.210.0000.01514.91
7.2.200.0060.00814.74
7.2.190.0040.00715.10
7.2.180.0000.01114.84
7.2.170.0000.01815.14
7.2.160.0070.00715.18
7.2.150.0060.00616.82
7.2.140.0030.00716.82
7.2.130.0070.00816.66
7.2.120.0120.00316.77
7.2.110.0050.01216.67
7.2.100.0050.00816.70
7.2.90.0030.00816.95
7.2.80.0110.01216.71
7.2.70.0080.00916.71
7.2.60.0080.00716.81
7.2.50.0080.01016.84
7.2.40.0120.01016.88
7.2.30.0130.00917.00
7.2.20.0120.00616.80
7.2.10.0120.01016.90
7.2.00.0100.00917.74
7.1.330.0000.01615.55
7.1.320.0060.00616.00
7.1.310.0030.01315.87
7.1.300.0060.00915.40
7.1.290.0070.00715.84
7.1.280.0070.00715.75
7.1.270.0040.00815.79
7.1.260.0070.01015.73
7.1.250.0070.00715.73
7.1.100.0030.00718.20
7.1.70.0040.00417.26
7.1.60.0170.00719.46
7.1.50.0030.01017.05
7.1.00.0070.07322.35
7.0.200.0070.00016.77
7.0.140.0130.05722.12
7.0.60.0070.07019.93
7.0.50.0000.09317.90
7.0.40.0030.09020.30
7.0.30.0130.05020.02
7.0.20.0170.06320.18
7.0.10.0400.05320.13
7.0.00.0030.04720.33
5.6.280.0000.07321.13
5.6.210.0070.08020.74
5.6.200.0100.05018.15
5.6.190.0130.08020.39
5.6.180.0200.03720.42
5.6.170.0270.06320.44
5.6.160.0030.04320.37
5.6.150.0100.07718.07
5.6.140.0130.05318.18
5.6.130.0070.08318.15
5.6.120.0030.05720.89
5.6.110.0300.06321.12
5.6.100.0070.08321.14
5.6.90.0070.07021.00
5.6.80.0070.05720.35
5.6.70.0230.06720.48
5.5.350.0070.08320.39
5.5.340.0100.07017.88
5.5.330.0130.06720.43
5.5.320.0070.05020.26
5.5.310.0230.08020.50
5.5.300.0070.04018.02
5.5.290.0170.07718.00
5.5.280.0070.08020.89
5.5.270.0030.08720.87
5.5.260.0100.07020.84
5.5.250.0030.08720.60
5.5.240.0100.07320.27
5.4.450.0300.06019.52
5.4.440.0270.04719.41
5.4.430.0100.06319.28
5.4.420.0130.05719.48
5.4.410.0170.05719.45
5.4.400.0170.05018.71
5.4.390.0270.06018.74
5.4.380.0100.06718.64
5.4.370.0200.05318.50
5.4.360.0270.04318.74
5.4.350.0230.04718.71
5.4.340.0100.06018.54
5.4.320.0230.06018.68
5.4.310.0100.06018.67
5.4.300.0100.06018.46
5.4.290.0170.05018.71
5.4.280.0070.06018.50
5.4.270.0130.05318.67
5.4.260.0230.04718.55
5.4.250.0270.04718.71
5.4.240.0070.06318.67
5.4.230.0300.04018.46
5.4.220.0200.05318.55
5.4.210.0200.05718.57
5.4.200.0070.06016.54
5.4.190.0330.06318.72
5.4.180.0330.06318.55
5.4.170.0270.06318.52
5.4.160.0130.05718.54
5.4.150.0100.06018.51
5.4.140.0130.06016.24
5.4.130.0270.04016.21
5.4.120.0230.04316.33
5.4.110.0170.05016.26
5.4.100.0130.05716.17
5.4.90.0300.04316.26
5.4.80.0200.06316.14
5.4.70.0130.05316.24
5.4.60.0170.06016.03
5.4.50.0170.04716.32
5.4.40.0130.06016.24
5.4.30.0130.05716.04
5.4.20.0170.05716.29
5.4.10.0130.05316.14
5.4.00.0130.05015.61
5.3.290.0130.05714.59
5.3.280.0070.06014.58
5.3.270.0230.07314.71
5.3.260.0200.05714.51
5.3.250.0100.05714.59
5.3.240.0130.05714.63
5.3.230.0100.05714.68
5.3.220.0170.05014.57
5.3.210.0230.04314.58
5.3.200.0100.05314.49
5.3.190.0070.06014.50
5.3.180.0100.05314.56
5.3.170.0070.05714.57
5.3.160.0270.04314.50
5.3.150.0230.05014.50
5.3.140.0170.05314.60
5.3.130.0200.05014.54
5.3.120.0130.05714.47
5.3.110.0170.05314.67
5.3.100.0100.05714.03
5.3.90.0170.05014.02
5.3.80.0230.05713.98
5.3.70.0100.05714.01
5.3.60.0230.04713.98
5.3.50.0170.04713.92
5.3.40.0200.04713.94
5.3.30.0270.04314.02
5.3.20.0070.05713.64
5.3.10.0130.05013.70
5.3.00.0130.05013.75
5.2.170.0170.04311.11
5.2.160.0070.04311.14
5.2.150.0170.04011.18
5.2.140.0200.04311.19
5.2.130.0100.04311.03
5.2.120.0100.04311.10
5.2.110.0070.04711.15
5.2.100.0100.04011.18
5.2.90.0130.04011.08
5.2.80.0170.04311.16
5.2.70.0030.05011.07
5.2.60.0130.04011.05
5.2.50.0030.05011.07
5.2.40.0200.04010.97
5.2.30.0030.05010.99
5.2.20.0170.03710.96
5.2.10.0170.03710.91
5.2.00.0130.04010.78
5.1.60.0100.03710.03
5.1.50.0100.03710.11
5.1.40.0000.04710.09
5.1.30.0100.03710.38
5.1.20.0070.04010.41
5.1.10.0130.03310.25
5.1.00.0130.03710.11
5.0.50.0030.0378.59
5.0.40.0100.0308.56
5.0.30.0000.0508.28
5.0.20.0070.0278.29
5.0.10.0130.0238.22
5.0.00.0100.0408.18
4.4.90.0070.0205.97
4.4.80.0000.0275.91
4.4.70.0100.0205.82
4.4.60.0030.0235.92
4.4.50.0030.0235.90
4.4.40.0070.0435.84
4.4.30.0100.0175.91
4.4.20.0000.0275.90
4.4.10.0070.0205.94
4.4.00.0030.0375.97
4.3.110.0030.0235.90
4.3.100.0100.0235.82
4.3.90.0000.0275.82
4.3.80.0130.0305.89
4.3.70.0070.0235.81
4.3.60.0130.0235.85
4.3.50.0070.0235.82
4.3.40.0100.0475.77
4.3.30.0030.0234.63
4.3.20.0000.0274.63
4.3.10.0030.0234.56
4.3.00.0100.0237.02

preferences:
60.08 ms | 401 KiB | 5 Q