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; $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.0170.00316.75
8.3.50.0150.00721.97
8.3.40.0130.00318.52
8.3.30.0140.00319.22
8.3.20.0070.00020.16
8.3.10.0040.00421.78
8.3.00.0040.00419.26
8.2.180.0140.00716.63
8.2.170.0040.01522.96
8.2.160.0140.00420.47
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0090.00026.16
8.2.120.0050.00319.78
8.2.110.0100.00020.87
8.2.100.0080.00617.63
8.2.90.0050.00319.04
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0000.00717.93
8.2.50.0030.00518.07
8.2.40.0060.00319.93
8.2.30.0000.00718.06
8.2.20.0040.00417.84
8.2.10.0000.00818.26
8.2.00.0000.00717.65
8.1.280.0070.01325.92
8.1.270.0100.01020.60
8.1.260.0000.00926.35
8.1.250.0000.00828.09
8.1.240.0030.00623.88
8.1.230.0040.00718.81
8.1.220.0000.00917.74
8.1.210.0080.00018.77
8.1.200.0070.00317.22
8.1.190.0000.00817.25
8.1.180.0070.00018.10
8.1.170.0050.00320.29
8.1.160.0040.00422.09
8.1.150.0000.00818.93
8.1.140.0040.00417.48
8.1.130.0060.00317.86
8.1.120.0070.00017.39
8.1.110.0030.00517.39
8.1.100.0030.00317.40
8.1.90.0000.00717.52
8.1.80.0070.00017.38
8.1.70.0050.00317.37
8.1.60.0080.00017.59
8.1.50.0070.00417.61
8.1.40.0060.00317.56
8.1.30.0060.00317.64
8.1.20.0050.00217.63
8.1.10.0030.00617.36
8.1.00.0000.00817.42
8.0.300.0050.00318.77
8.0.290.0000.00816.58
8.0.280.0070.00018.47
8.0.270.0030.00316.74
8.0.260.0030.00317.29
8.0.250.0080.00016.89
8.0.240.0000.00616.98
8.0.230.0000.00716.94
8.0.220.0070.00016.86
8.0.210.0050.00316.90
8.0.200.0030.00316.98
8.0.190.0070.00016.98
8.0.180.0000.00816.93
8.0.170.0000.00716.95
8.0.160.0000.00716.89
8.0.150.0020.00616.93
8.0.140.0000.00716.92
8.0.130.0030.00313.39
8.0.120.0040.00416.77
8.0.110.0070.00016.84
8.0.100.0040.00416.77
8.0.90.0040.00416.79
8.0.80.0080.00816.91
8.0.70.0000.00816.98
8.0.60.0040.00416.88
8.0.50.0040.00416.98
8.0.30.0120.01116.95
8.0.20.0060.01317.40
8.0.10.0050.00217.10
8.0.00.0030.01416.77
7.4.330.0020.00215.03
7.4.320.0070.00016.62
7.4.300.0040.00416.62
7.4.290.0070.00016.63
7.4.280.0030.00316.52
7.4.270.0030.00316.68
7.4.260.0070.00016.56
7.4.250.0040.00416.64
7.4.240.0030.00516.62
7.4.230.0020.00516.70
7.4.220.0100.00716.54
7.4.210.0070.00716.73
7.4.200.0030.00316.42
7.4.160.0100.01316.51
7.4.150.0090.00917.40
7.4.140.0130.00417.86
7.4.130.0060.01016.57
7.4.120.0100.00816.47
7.4.110.0080.00816.44
7.4.100.0150.00816.53
7.4.90.0100.00616.66
7.4.80.0100.00719.39
7.4.70.0070.01116.47
7.4.60.0070.01016.38
7.4.50.0000.00416.44
7.4.40.0050.01116.46
7.4.30.0130.00616.47
7.4.00.0100.00714.86
7.3.330.0000.00513.17
7.3.320.0170.00013.23
7.3.310.0040.00416.35
7.3.300.0000.00616.38
7.3.290.0050.00916.35
7.3.280.0090.00816.39
7.3.270.0150.00917.40
7.3.260.0120.00616.37
7.3.250.0090.00916.59
7.3.240.0180.00416.54
7.3.230.0120.00616.47
7.3.210.0130.00316.43
7.3.200.0080.00819.39
7.3.190.0100.00716.38
7.3.180.0100.00716.64
7.3.170.0030.01916.48
7.3.160.0060.00916.39
7.2.330.0070.01116.60
7.2.320.0120.00916.74
7.2.310.0170.00016.51
7.2.300.0090.00916.54
7.2.290.0060.01316.71
7.2.00.0060.00619.09
7.1.100.0060.00617.81
7.1.70.0040.00817.24
7.1.60.0110.01119.46
7.1.50.0270.01034.89
7.1.00.0100.07022.39
7.0.200.0030.00616.61
7.0.140.0000.03722.12
7.0.60.0200.08021.71
7.0.50.0100.08017.90
7.0.40.0070.07320.20
7.0.30.0530.05020.12
7.0.20.0230.04320.19
7.0.10.0030.04720.32
7.0.00.0100.08320.16
5.6.280.0030.07320.93
5.6.210.0130.08320.67
5.6.200.0030.04018.18
5.6.190.0070.05020.27
5.6.180.0070.05020.41
5.6.170.0130.04720.54
5.6.160.0170.07720.61
5.6.150.0030.04718.13
5.6.140.0030.07718.15
5.6.130.0070.05318.21
5.6.120.0070.08321.13
5.6.110.0100.08321.15
5.6.100.0070.06721.01
5.6.90.0030.09020.98
5.6.80.0100.05320.29
5.5.350.0270.08320.35
5.5.340.0030.08018.01
5.5.330.0100.05720.46
5.5.320.0200.07320.18
5.5.310.0170.04020.27
5.5.300.0100.07717.95
5.5.290.0030.07717.98
5.5.280.0100.07320.98
5.5.270.0070.03720.65
5.5.260.0030.04020.87
5.5.250.0170.06320.47
5.5.240.0130.03020.13
5.4.450.0070.08319.43
5.4.440.0100.07719.43
5.4.430.0070.04719.48
5.4.420.1630.03319.45
5.4.410.1530.04019.37
5.4.400.1600.03019.22
5.4.390.1870.03718.92
5.4.380.1730.04019.10
5.4.370.1730.05018.92
5.4.360.1870.04018.78
5.4.350.1530.04018.91
5.4.340.1630.03019.16
5.4.320.1770.04318.88
5.4.310.1700.04019.09
5.4.300.1770.04019.23
5.4.290.1670.03318.80
5.4.280.1870.04719.08
5.4.270.1830.04019.13
5.4.260.1770.04319.08
5.4.250.1500.04019.15
5.4.240.1770.04319.06
5.4.230.1570.04719.09
5.4.220.1870.04019.21
5.4.210.1770.05319.21
5.4.200.1870.04319.09
5.4.190.1730.04319.05
5.4.180.1870.04018.89
5.4.170.1800.04719.12
5.4.160.1830.04019.23
5.4.150.1770.05019.14
5.4.140.1700.04016.46
5.4.130.1770.04016.32
5.4.120.1900.04316.26
5.4.110.2000.04316.20
5.4.100.1870.04316.49
5.4.90.1830.04316.46
5.4.80.1630.03316.44
5.4.70.1670.03016.46
5.4.60.1630.03316.20
5.4.50.1630.04016.40
5.4.40.1630.03716.36
5.4.30.1600.03716.34
5.4.20.1930.04016.04
5.4.10.2070.03316.40
5.4.00.1900.04015.78
5.3.290.1600.04014.69
5.3.280.1600.03714.62
5.3.270.1870.03714.52
5.3.260.1770.03314.60
5.3.250.1930.04314.60
5.3.240.1670.04014.56
5.3.230.1600.04014.56
5.3.220.1900.04714.52
5.3.210.1670.03314.59
5.3.200.1970.04014.48
5.3.190.1770.03714.53
5.3.180.1570.04014.62
5.3.170.0000.07314.51
5.3.160.0070.06014.52
5.3.150.0670.05314.52
5.3.140.1630.03714.40
5.3.130.1600.04714.51
5.3.120.1600.03314.54
5.3.110.1600.03714.39
5.3.100.1800.03713.99
5.3.90.1570.03713.88
5.3.80.1630.04313.97
5.3.70.1470.04713.98
5.3.60.1700.03713.96
5.3.50.1830.04013.94
5.3.40.1400.04014.00
5.3.30.0100.07313.87
5.3.20.0030.05013.64
5.3.10.1130.05713.68
5.3.00.1770.03713.60
5.2.170.1530.04311.01
5.2.160.1200.03711.24
5.2.150.1500.03711.02
5.2.140.1570.03711.22
5.2.130.1370.03711.05
5.2.120.1470.03710.95
5.2.110.1570.03311.02
5.2.100.1400.02711.00
5.2.90.1570.03311.29
5.2.80.1330.03011.12
5.2.70.1000.03311.02
5.2.60.0000.03710.95
5.2.50.0030.03711.05
5.2.40.0070.04710.95
5.2.30.1100.03710.87
5.2.20.1200.03010.82
5.2.10.1130.02311.01
5.2.00.1270.03710.63
5.1.60.1300.03010.15
5.1.50.1030.02710.08
5.1.40.0900.0279.91
5.1.30.0930.02710.46
5.1.20.1130.02310.41
5.1.10.1070.03010.08
5.1.00.1170.0339.98
5.0.50.0730.0278.48
5.0.40.0670.0308.48
5.0.30.0570.0308.29
5.0.20.0630.0208.29
5.0.10.0670.0378.06
5.0.00.0600.0378.25
4.4.90.0570.0207.86
4.4.80.0600.0207.86
4.4.70.0530.0277.86
4.4.60.0600.0207.86
4.4.50.0730.0207.86
4.4.40.0570.0337.86
4.4.30.0600.0177.86
4.4.20.0670.0137.86
4.4.10.0530.0137.86
4.4.00.0830.0177.86
4.3.110.0500.0177.86
4.3.100.0430.0237.86
4.3.90.0630.0237.86
4.3.80.0530.0277.86
4.3.70.0630.0177.86
4.3.60.0630.0237.86
4.3.50.0630.0207.86
4.3.40.0530.0237.86
4.3.30.0030.0237.86
4.3.20.0370.0337.86
4.3.10.0070.0237.86
4.3.00.0330.0177.86

preferences:
44.94 ms | 401 KiB | 5 Q