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] > */ for ($ss = -1; $ss<10; ++$ss){ $currentpageid = $nmstart = $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.70.0120.00918.31
8.3.60.0110.01116.75
8.3.50.0090.01121.96
8.3.40.0110.01118.71
8.3.30.0120.00318.90
8.3.20.0000.00720.38
8.3.10.0090.00621.59
8.3.00.0060.00319.25
8.2.190.0040.01816.63
8.2.180.0120.00916.50
8.2.170.0030.01622.96
8.2.160.0110.00322.13
8.2.150.0070.01024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00319.77
8.2.110.0030.00719.39
8.2.100.0060.00617.63
8.2.90.0040.00419.21
8.2.80.0000.00917.97
8.2.70.0050.00517.50
8.2.60.0050.00317.93
8.2.50.0090.00318.07
8.2.40.0000.00819.95
8.2.30.0000.00718.02
8.2.20.0030.00517.75
8.2.10.0000.00818.13
8.2.00.0030.00517.75
8.1.280.0140.00725.92
8.1.270.0030.00620.82
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.82
8.1.230.0120.00018.84
8.1.220.0050.00317.76
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0000.00820.36
8.1.160.0040.00421.94
8.1.150.0040.00418.82
8.1.140.0040.00417.50
8.1.130.0000.00717.85
8.1.120.0070.00017.42
8.1.110.0000.00717.50
8.1.100.0030.00517.36
8.1.90.0030.00517.47
8.1.80.0030.00517.38
8.1.70.0030.00317.35
8.1.60.0050.00517.52
8.1.50.0090.00017.42
8.1.40.0080.00017.58
8.1.30.0000.00817.66
8.1.20.0000.00717.71
8.1.10.0060.00317.40
8.1.00.0040.00417.48
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0040.00418.37
8.0.270.0040.00417.23
8.0.260.0000.00717.18
8.0.250.0030.00316.85
8.0.240.0000.00716.95
8.0.230.0070.00016.97
8.0.220.0030.00316.96
8.0.210.0040.00416.87
8.0.200.0000.00716.99
8.0.190.0040.00416.88
8.0.180.0000.00716.84
8.0.170.0060.00317.01
8.0.160.0000.00816.82
8.0.150.0000.00716.82
8.0.140.0040.00416.78
8.0.130.0030.00313.36
8.0.120.0030.00516.84
8.0.110.0040.00416.90
8.0.100.0000.00716.71
8.0.90.0000.00816.85
8.0.80.0110.00316.91
8.0.70.0000.00817.02
8.0.60.0040.00416.90
8.0.50.0060.00316.93
8.0.30.0120.01417.12
8.0.20.0180.00817.40
8.0.10.0070.00016.98
8.0.00.0070.01116.85
7.4.330.0000.00515.15
7.4.320.0030.00316.65
7.4.300.0000.00716.62
7.4.290.0030.00316.57
7.4.280.0050.00316.57
7.4.270.0000.00716.49
7.4.260.0000.00716.55
7.4.250.0040.00416.55
7.4.240.0000.00716.55
7.4.230.0070.00016.62
7.4.220.0070.01116.62
7.4.210.0110.00616.66
7.4.200.0000.00716.52
7.4.160.0150.00916.40
7.4.150.0180.00917.40
7.4.140.0150.00517.86
7.4.130.0100.00816.53
7.4.120.0080.01016.52
7.4.110.0030.01516.39
7.4.100.0040.01516.48
7.4.90.0090.00916.57
7.4.80.0130.00719.39
7.4.70.0100.00716.32
7.4.60.0140.00316.50
7.4.50.0040.00416.67
7.4.40.0060.01316.45
7.4.30.0120.00716.64
7.4.10.0100.01015.00
7.4.00.0050.00914.81
7.3.330.0050.00013.28
7.3.320.0110.00513.29
7.3.310.0030.00316.20
7.3.300.0000.00816.33
7.3.290.0050.00216.24
7.3.280.0070.01216.34
7.3.270.0110.00717.40
7.3.260.0080.01216.55
7.3.250.0070.01416.34
7.3.240.0120.00416.52
7.3.230.0120.01216.39
7.3.210.0110.00816.69
7.3.200.0000.01619.39
7.3.190.0060.01016.41
7.3.180.0120.00616.51
7.3.170.0030.01416.30
7.3.160.0130.00316.29
7.3.130.0040.01614.79
7.3.120.0070.01015.05
7.3.110.0030.01414.95
7.3.100.0110.00414.92
7.3.90.0030.01314.82
7.3.80.0040.00714.93
7.3.70.0060.01214.96
7.3.60.0080.00414.72
7.3.50.0070.00414.98
7.3.40.0080.00414.99
7.3.30.0040.01114.69
7.3.20.0090.00016.85
7.3.10.0020.01216.72
7.3.00.0060.00816.78
7.2.330.0090.00916.50
7.2.320.0030.01616.61
7.2.310.0070.01016.71
7.2.300.0030.01316.86
7.2.290.0190.00616.58
7.2.260.0030.01015.18
7.2.250.0070.01115.36
7.2.240.0120.00015.05
7.2.230.0030.01214.88
7.2.220.0000.01615.29
7.2.210.0000.01214.91
7.2.200.0030.00815.16
7.2.190.0050.00515.16
7.2.180.0100.00015.16
7.2.170.0090.00615.18
7.2.160.0090.00615.13
7.2.150.0090.00917.07
7.2.140.0100.00316.76
7.2.130.0050.01016.94
7.2.120.0100.00516.86
7.2.110.0080.00517.00
7.2.100.0060.00716.81
7.2.90.0080.00516.82
7.2.80.0050.01116.94
7.2.70.0050.01116.84
7.2.60.0060.00516.96
7.2.50.0050.01216.81
7.2.40.0100.01016.93
7.2.30.0090.01116.95
7.2.20.0060.01116.93
7.2.10.0080.00716.93
7.2.00.0080.00917.78
7.1.330.0090.00615.54
7.1.320.0030.01615.59
7.1.310.0060.00615.78
7.1.300.0040.00715.98
7.1.290.0070.00315.68
7.1.280.0070.00415.63
7.1.270.0040.00815.75
7.1.260.0080.00315.71
7.1.250.0050.00915.84
7.1.240.0070.00715.77
7.1.230.0000.00815.84
7.1.220.0140.00015.85
7.1.210.0100.00015.79
7.1.200.0040.00915.79
7.1.190.0040.00415.67
7.1.180.0040.00715.96
7.1.170.0070.00415.88
7.1.160.0060.00915.77
7.1.150.0090.00015.71
7.1.140.0060.00615.87
7.1.130.0000.01315.75
7.1.120.0120.00015.94
7.1.110.0000.01615.63
7.1.100.1810.00916.83
7.1.90.0090.00315.60
7.1.80.0000.01215.64
7.1.70.0050.01016.66
7.1.60.0060.01117.69
7.1.50.0080.00816.36
7.1.40.0090.00015.86
7.1.30.0060.00915.64
7.1.20.0030.01015.90
7.1.10.0110.00415.77
7.1.00.0050.04219.05
7.0.330.0030.01015.28
7.0.320.0000.01415.43
7.0.310.0070.00715.45
7.0.300.0060.00615.38
7.0.290.0070.00715.28
7.0.280.0070.01015.52
7.0.270.0000.01015.53
7.0.260.0100.00315.53
7.0.250.0090.00315.43
7.0.240.0100.00315.34
7.0.230.0050.00315.24
7.0.220.0000.00915.29
7.0.210.0090.00615.22
7.0.200.0060.00616.08
7.0.190.0000.01215.57
7.0.180.0070.00715.29
7.0.170.0030.01015.46
7.0.160.0070.01015.59
7.0.150.0120.00315.53
7.0.140.0040.02718.75
7.0.130.0060.00915.50
7.0.120.0000.01315.43
7.0.110.0030.01015.47
7.0.100.0100.00715.52
7.0.90.0110.00715.26
7.0.80.0070.00715.46
7.0.70.0100.00315.46
7.0.60.0050.04517.64
7.0.50.0050.04016.68
7.0.40.0020.04216.74
7.0.30.0100.04916.83
7.0.20.0190.04316.71
7.0.10.0170.04716.86
7.0.00.0080.04316.78
5.6.400.0040.01114.18
5.6.390.0000.00814.39
5.6.380.0000.01314.41
5.6.370.0060.00914.55
5.6.360.0060.00514.35
5.6.350.0000.01214.22
5.6.340.0000.01114.05
5.6.330.0060.00614.39
5.6.320.0100.00014.22
5.6.310.0070.01014.20
5.6.300.0030.01313.98
5.6.290.0030.01414.32
5.6.280.0060.03817.66
5.6.270.0060.01014.74
5.6.260.0120.00314.33
5.6.250.0070.01014.66
5.6.240.0070.00714.50
5.6.230.0030.01014.29
5.6.220.0000.01614.33
5.6.210.0030.05117.50
5.6.200.0020.03116.29
5.6.190.0070.03317.44
5.6.180.0050.03117.52
5.6.170.0220.02717.45
5.6.160.0050.04517.41
5.6.150.0050.04316.21
5.6.140.0070.02516.26
5.6.130.0050.04616.24
5.6.120.0100.04217.85
5.6.110.0050.04317.57
5.6.100.0030.04017.79
5.6.90.0030.03317.63
5.6.80.0070.04017.27
5.6.70.0150.04417.41
5.6.60.0060.01014.33
5.6.50.0030.01014.28
5.6.40.0070.01014.09
5.6.30.0130.00014.07
5.6.20.0040.01214.17
5.6.10.0060.00614.36
5.6.00.0000.01414.30
5.5.380.0030.01114.44
5.5.370.0060.00314.45
5.5.360.0030.00614.29
5.5.350.0110.04017.45
5.5.340.0060.04016.15
5.5.330.0110.02317.36
5.5.320.0070.04717.10
5.5.310.0130.03817.35
5.5.300.0100.02516.17
5.5.290.0080.03516.13
5.5.280.0050.02517.73
5.5.270.0060.03817.53
5.5.260.0020.04317.63
5.5.250.0070.03017.50
5.5.240.0060.04217.34
5.5.230.0070.01114.13
5.5.220.0060.00914.47
5.5.210.0000.00914.44
5.5.200.0030.00914.28
5.5.190.0060.00614.27
5.5.180.0070.00414.46
5.5.170.0040.01114.32
5.5.160.0030.01014.35
5.5.150.0060.00914.48
5.5.140.0110.00314.34
5.5.130.0000.01314.23
5.5.120.0090.00614.35
5.5.110.0030.01314.27
5.5.100.0090.00914.20
5.5.90.0070.00414.10
5.5.80.0030.00613.98
5.5.70.0100.00314.14
5.5.60.0070.00714.21
5.5.50.0100.00614.40
5.5.40.0040.01114.09
5.5.30.0030.01014.09
5.5.20.0060.00614.23
5.5.10.0000.01114.18
5.5.00.0060.00614.27
5.4.450.0150.03115.61
5.4.440.0110.03415.59
5.4.430.0130.03415.61
5.4.420.0130.02515.44
5.4.410.0110.03315.52
5.4.400.0050.03215.19
5.4.390.0070.03215.14
5.4.380.0130.02815.15
5.4.370.0100.03115.18
5.4.360.0080.03015.10
5.4.350.0150.02615.12
5.4.340.0170.02315.23
5.4.330.0070.00311.63
5.4.320.0080.03015.18
5.4.310.0060.03315.13
5.4.300.0170.02215.20
5.4.290.0070.03115.17
5.4.280.0080.03215.18
5.4.270.0070.03215.15
5.4.260.0120.02815.15
5.4.250.0060.03315.09
5.4.240.0130.02515.16
5.4.230.0050.03315.11
5.4.220.0080.03115.06
5.4.210.0120.02715.07
5.4.200.0090.02714.10
5.4.190.0100.03015.09
5.4.180.0130.02615.10
5.4.170.0110.02715.16
5.4.160.0070.02815.13
5.4.150.0120.03115.15
5.4.140.0100.03013.96
5.4.130.0080.03013.98
5.4.120.0150.02213.97
5.4.110.0080.02713.86
5.4.100.0080.02813.90
5.4.90.0080.03213.90
5.4.80.0080.03313.85
5.4.70.0030.03513.92
5.4.60.0080.02813.88
5.4.50.0100.02513.98
5.4.40.0100.02713.83
5.4.30.0100.02713.93
5.4.20.0070.03013.88
5.4.10.0070.03013.92
5.4.00.0100.02813.74
5.3.290.0170.05314.77
5.3.280.0130.05314.60
5.3.270.0270.05014.72
5.3.260.0270.04314.62
5.3.250.0230.04314.56
5.3.240.0230.04314.69
5.3.230.0030.06714.61
5.3.220.0130.05314.56
5.3.210.0170.05714.58
5.3.200.0170.07314.64
5.3.190.0170.05014.57
5.3.180.0170.05014.63
5.3.170.0230.04314.65
5.3.160.0170.05014.55
5.3.150.0100.05714.55
5.3.140.0130.05714.55
5.3.130.0200.04714.55
5.3.120.0070.06714.65
5.3.110.0070.07014.46
5.3.100.0230.04314.13
5.3.90.0200.05714.08
5.3.80.0130.05014.12
5.3.70.0230.04313.99
5.3.60.0030.06013.95
5.3.50.0170.04713.95
5.3.40.0130.05313.91
5.3.30.0230.04713.95
5.3.20.0170.05013.68
5.3.10.0170.05313.56
5.3.00.0100.06013.74
5.2.170.0130.04011.21
5.2.160.0100.04311.09
5.2.150.0100.04311.12
5.2.140.0070.04711.09
5.2.130.0100.04311.27
5.2.120.0130.04311.27
5.2.110.0070.04310.99
5.2.100.0100.04311.11
5.2.90.0130.04011.08
5.2.80.0100.04711.07
5.2.70.0170.04011.02
5.2.60.0200.03311.05
5.2.50.0100.05311.07
5.2.40.0000.05011.16
5.2.30.0070.04311.02
5.2.20.0130.04011.01
5.2.10.0070.04311.08
5.2.00.0000.05010.95
5.1.60.0100.03310.13
5.1.50.0070.04010.04
5.1.40.0000.04710.17
5.1.30.0100.03710.32
5.1.20.0130.03710.54
5.1.10.0130.03310.26
5.1.00.0100.03710.10
5.0.50.0070.0308.74
5.0.40.0100.0238.56
5.0.30.0070.0438.36
5.0.20.0000.0338.20
5.0.10.0100.0238.21
5.0.00.0070.0438.18
4.4.90.0030.0235.93
4.4.80.0130.0135.84
4.4.70.0000.0275.90
4.4.60.0100.0175.93
4.4.50.0100.0205.89
4.4.40.0030.0375.95
4.4.30.0070.0205.91
4.4.20.0030.0235.95
4.4.10.0030.0235.99
4.4.00.0000.0405.96
4.3.110.0000.0275.81
4.3.100.0130.0175.82
4.3.90.0100.0175.94
4.3.80.0070.0335.79
4.3.70.0070.0235.80
4.3.60.0070.0205.84
4.3.50.0070.0205.82
4.3.40.0100.0305.78
4.3.30.0100.0204.59
4.3.20.0030.0234.55
4.3.10.0030.0204.55
4.3.00.0000.0277.02

preferences:
52.8 ms | 401 KiB | 5 Q