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 = 3; $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) - 1; if ( $ssPagingCurrentCountFrom < 0 ) $ssPagingCurrentCountFrom = 0; $ssPagingCurrentCountTo = $currentpageid + (int)($ssPagingCurrentCount/2) + 1; 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.40.0140.00718.67
8.3.30.0090.00618.91
8.3.20.0050.00320.16
8.3.10.0130.00621.87
8.3.00.0040.00419.51
8.2.170.0130.00722.96
8.2.160.0140.00719.41
8.2.150.0060.01024.18
8.2.140.0070.01124.66
8.2.130.0080.00026.16
8.2.120.0030.00619.49
8.2.110.0080.00320.83
8.2.100.0090.00317.50
8.2.90.0050.00319.05
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0030.00618.04
8.2.50.0060.00318.07
8.2.40.0030.00720.01
8.2.30.0040.00417.99
8.2.20.0050.00317.77
8.2.10.0000.00818.20
8.2.00.0000.00717.68
8.1.270.0080.01220.41
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00624.02
8.1.230.0050.00518.76
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0040.00417.10
8.1.180.0050.00318.10
8.1.170.0000.00820.43
8.1.160.0070.00022.04
8.1.150.0040.00418.98
8.1.140.0040.00417.47
8.1.130.0000.00717.96
8.1.120.0050.00317.51
8.1.110.0050.00317.44
8.1.100.0040.00417.33
8.1.90.0000.00717.43
8.1.80.0000.00717.39
8.1.70.0000.00717.46
8.1.60.0030.00617.54
8.1.50.0040.00417.47
8.1.40.0050.00317.60
8.1.30.0000.00817.72
8.1.20.0000.00817.66
8.1.10.0050.00317.36
8.1.00.0040.00417.36
8.0.300.0020.00518.77
8.0.290.0040.00416.75
8.0.280.0040.00418.37
8.0.270.0040.00417.22
8.0.260.0030.00317.29
8.0.250.0050.00216.99
8.0.240.0030.00317.03
8.0.230.0040.00416.87
8.0.220.0040.00416.92
8.0.210.0000.00716.90
8.0.200.0060.00016.93
8.0.190.0060.00317.00
8.0.180.0050.00216.97
8.0.170.0080.00016.92
8.0.160.0040.00416.98
8.0.150.0050.00316.80
8.0.140.0000.00716.77
8.0.130.0060.00013.22
8.0.120.0000.00816.77
8.0.110.0040.00416.91
8.0.100.0040.00416.79
8.0.90.0070.00017.04
8.0.80.0100.00616.91
8.0.70.0000.00716.79
8.0.60.0040.00416.79
8.0.50.0050.00216.81
8.0.30.0070.01217.26
8.0.20.0120.00717.40
8.0.10.0040.00417.11
8.0.00.0100.00816.83
7.4.330.0030.00315.09
7.4.320.0030.00316.54
7.4.300.0080.00016.66
7.4.290.0030.00316.63
7.4.280.0070.00016.49
7.4.270.0000.00716.43
7.4.260.0000.00716.52
7.4.250.0050.00216.42
7.4.240.0020.00516.50
7.4.230.0000.00716.63
7.4.220.0070.01016.63
7.4.210.0100.00316.56
7.4.200.0000.00716.70
7.4.160.0040.01916.59
7.4.150.0100.01017.40
7.4.140.0040.01317.86
7.4.130.0140.00616.44
7.4.120.0090.00916.51
7.4.110.0000.01716.46
7.4.100.0140.00416.57
7.4.90.0070.01016.41
7.4.80.0120.00819.39
7.4.70.0110.00816.32
7.4.60.0070.01116.64
7.4.50.0040.00416.33
7.4.40.0100.00716.66
7.4.30.0040.01416.59
7.4.00.0030.01214.80
7.3.330.0000.00513.08
7.3.320.0070.00712.86
7.3.310.0000.00716.34
7.3.300.0070.00016.26
7.3.290.0050.00916.30
7.3.280.0070.00816.24
7.3.270.0120.00917.40
7.3.260.0000.01716.57
7.3.250.0090.01016.51
7.3.240.0130.00316.34
7.3.230.0130.01016.39
7.3.210.0060.01016.37
7.3.200.0080.00819.39
7.3.190.0100.00716.48
7.3.180.0120.00916.37
7.3.170.0090.00916.36
7.3.160.0110.00816.47
7.3.120.0130.00614.87
7.3.110.0130.00714.78
7.3.100.0100.01014.77
7.3.90.0110.00314.84
7.3.80.0040.00814.79
7.3.70.0070.00315.00
7.3.60.0060.00914.87
7.3.50.0070.00714.72
7.3.40.0040.01114.73
7.3.30.0000.01114.84
7.3.20.0030.01416.52
7.3.10.0030.00716.74
7.3.00.0100.00716.78
7.2.330.0130.00616.68
7.2.320.0160.00616.63
7.2.310.0130.00316.55
7.2.300.0000.01716.63
7.2.290.0110.01116.57
7.2.250.0070.01014.87
7.2.240.0030.01315.04
7.2.230.0090.00615.10
7.2.220.0030.01114.99
7.2.210.0030.00715.20
7.2.200.0160.00014.93
7.2.190.0000.01615.10
7.2.180.0000.01415.08
7.2.170.0000.01014.88
7.2.160.0060.00914.98
7.2.150.0030.01016.78
7.2.140.0060.00916.66
7.2.130.0030.01016.88
7.2.120.0090.00616.93
7.2.110.0120.00416.70
7.2.100.0000.01616.95
7.2.90.0030.00916.73
7.2.80.0060.00616.88
7.2.70.0030.00716.98
7.2.60.0050.00816.91
7.2.50.0060.00616.82
7.2.40.0060.01017.04
7.2.30.0060.00616.75
7.2.20.0070.00716.90
7.2.10.0000.01116.55
7.2.00.0060.00617.79
7.1.330.0040.01415.69
7.1.320.0040.01115.94
7.1.310.0080.00815.74
7.1.300.0070.00715.82
7.1.290.0030.00715.85
7.1.280.0040.01115.45
7.1.270.0070.00715.54
7.1.260.0000.01415.81
7.1.250.0060.00615.81
7.1.240.0070.01015.51
7.1.230.0030.01215.52
7.1.220.0030.00915.88
7.1.210.0060.00315.60
7.1.200.0050.00815.66
7.1.190.0030.00615.67
7.1.180.0060.00615.64
7.1.170.0100.00715.96
7.1.160.0090.00615.92
7.1.150.0130.00015.94
7.1.140.0040.01115.90
7.1.130.0080.00815.63
7.1.120.0060.00615.96
7.1.110.0000.01415.74
7.1.100.0050.00917.10
7.1.90.0090.00615.77
7.1.80.0070.00315.82
7.1.70.0070.00616.37
7.1.60.0070.01217.73
7.1.50.0110.01225.24
7.1.40.0080.00615.67
7.1.30.0000.01515.58
7.1.20.0060.00615.62
7.1.10.0090.00015.61
7.1.00.0010.04319.24
7.0.330.0070.00615.36
7.0.320.0000.01415.62
7.0.310.0060.00615.39
7.0.300.0030.01415.29
7.0.290.0070.00715.26
7.0.280.0080.00515.04
7.0.270.0030.01015.55
7.0.260.0000.01115.51
7.0.250.0030.00615.30
7.0.240.0030.01015.23
7.0.230.0040.01115.43
7.0.220.0070.00315.19
7.0.210.0000.00915.41
7.0.200.0030.00816.05
7.0.190.0060.00315.40
7.0.180.0040.00415.39
7.0.170.0000.01415.57
7.0.160.0070.00815.37
7.0.150.0000.00815.54
7.0.140.0030.02018.75
7.0.130.0060.00615.39
7.0.120.0080.00315.41
7.0.110.0070.01015.10
7.0.100.0000.01315.40
7.0.90.0040.00715.49
7.0.80.0040.00715.41
7.0.70.2340.02517.55
7.0.60.0060.03117.70
7.0.50.0030.03316.76
7.0.40.0030.02716.63
7.0.30.0150.04216.83
7.0.20.0130.04016.70
7.0.10.0200.04516.79
7.0.00.0030.04616.85
5.6.400.0070.00714.14
5.6.390.0030.01014.57
5.6.380.0040.01114.21
5.6.370.0040.00414.45
5.6.360.0100.00313.97
5.6.350.0040.00814.62
5.6.340.0070.00714.23
5.6.330.0090.00014.56
5.6.320.0000.01413.85
5.6.310.0030.01014.61
5.6.300.0000.01314.68
5.6.290.0030.01014.27
5.6.280.0110.03517.69
5.6.270.0030.01014.16
5.6.260.0070.00414.29
5.6.250.0060.00914.26
5.6.240.0070.01014.52
5.6.230.0090.00614.53
5.6.220.0080.00414.05
5.6.210.0080.04117.43
5.6.200.0050.03316.34
5.6.190.0090.04717.50
5.6.180.0100.02817.53
5.6.170.0130.02617.37
5.6.160.0130.03017.33
5.6.150.0050.04516.22
5.6.140.0070.04616.22
5.6.130.0070.03316.29
5.6.120.0120.04317.69
5.6.110.0130.03717.68
5.6.100.0050.04017.51
5.6.90.0050.03717.59
5.6.80.0090.04417.27
5.6.70.0170.04217.22
5.6.60.0070.00714.13
5.6.50.0060.00614.29
5.6.40.0060.00913.96
5.6.30.0060.00314.23
5.6.20.0000.01014.27
5.6.10.0060.01114.47
5.6.00.0060.00914.30
5.5.380.0100.00314.27
5.5.370.0000.01614.34
5.5.360.0110.00414.05
5.5.350.0080.02317.22
5.5.340.0000.03916.05
5.5.330.0080.03817.44
5.5.320.0050.04317.42
5.5.310.0240.03317.31
5.5.300.0070.04216.07
5.5.290.0050.03816.21
5.5.280.0090.04017.72
5.5.270.0100.04017.70
5.5.260.0110.04217.52
5.5.250.0050.04517.44
5.5.240.0100.03817.15
5.5.230.0120.00014.00
5.5.220.0060.00614.30
5.5.210.0040.00713.98
5.5.200.0090.00614.08
5.5.190.0090.00014.32
5.5.180.0120.00314.24
5.5.170.0030.00713.99
5.5.160.0030.01314.21
5.5.150.0030.01013.97
5.5.140.0060.00314.02
5.5.130.0120.00314.21
5.5.120.0040.00713.93
5.5.110.0000.01714.18
5.5.100.0070.01013.91
5.5.90.0030.01014.02
5.5.80.0060.00614.28
5.5.70.0090.00613.98
5.5.60.0030.01014.18
5.5.50.0030.01114.22
5.5.40.0040.01214.05
5.5.30.0070.01114.22
5.5.20.0090.00613.90
5.5.10.0030.01014.39
5.5.00.0040.00714.08
5.4.450.0370.03815.83
5.4.440.0110.03315.80
5.4.430.0150.02315.78
5.4.420.0130.02815.80
5.4.410.0080.04415.81
5.4.400.0080.03215.43
5.4.390.0120.03015.36
5.4.380.0070.03415.42
5.4.370.0050.03715.32
5.4.360.0120.02615.31
5.4.350.0090.03015.42
5.4.340.0130.02615.34
5.4.330.0000.00812.11
5.4.320.0150.02315.40
5.4.310.0120.03015.41
5.4.300.0130.02815.34
5.4.290.0110.03015.31
5.4.280.0080.02915.42
5.4.270.0130.02515.27
5.4.260.0150.02515.37
5.4.250.0050.03315.31
5.4.240.0150.02915.30
5.4.230.0120.02815.32
5.4.220.0070.03515.35
5.4.210.0090.02915.41
5.4.200.0110.03014.34
5.4.190.0100.03215.39
5.4.180.0150.03215.30
5.4.170.0100.02815.34
5.4.160.0150.03115.44
5.4.150.0130.03015.39
5.4.140.0110.03314.12
5.4.130.0110.03814.17
5.4.120.0100.02914.19
5.4.110.0080.02814.24
5.4.100.0130.03514.14
5.4.90.0200.03214.10
5.4.80.0230.02314.18
5.4.70.0180.03314.20
5.4.60.0220.02314.09
5.4.50.0170.02314.08
5.4.40.0130.03514.20
5.4.30.0180.02314.19
5.4.20.0110.02814.12
5.4.10.0110.02814.21
5.4.00.0060.02913.80
5.3.290.0230.05014.60
5.3.280.0070.06014.52
5.3.270.0170.05314.59
5.3.260.0130.05714.70
5.3.250.0230.04714.52
5.3.240.0100.06314.58
5.3.230.0170.05014.61
5.3.220.0100.06314.51
5.3.210.0200.07714.61
5.3.200.0130.05014.57
5.3.190.0230.04314.49
5.3.180.0330.03714.48
5.3.170.0200.04314.48
5.3.160.0200.04714.48
5.3.150.0200.04714.55
5.3.140.0170.05714.66
5.3.130.0170.05014.63
5.3.120.0130.05314.54
5.3.110.0130.06014.52
5.3.100.0200.04314.15
5.3.90.0270.04314.00
5.3.80.0130.05014.02
5.3.70.0170.06014.13
5.3.60.0100.06013.93
5.3.50.0170.05013.85
5.3.40.0130.05013.98
5.3.30.0130.05013.93
5.3.20.0200.04713.63
5.3.10.0270.03713.58
5.3.00.0100.06013.57
5.2.170.0070.04711.19
5.2.160.0030.05011.14
5.2.150.0130.06011.12
5.2.140.0130.04011.17
5.2.130.0230.03011.16
5.2.120.0130.04711.27
5.2.110.0070.04711.14
5.2.100.0070.04711.06
5.2.90.0100.04011.15
5.2.80.0200.05711.06
5.2.70.0170.03711.14
5.2.60.0130.04311.21
5.2.50.0170.03710.98
5.2.40.0100.04010.98
5.2.30.0130.03710.95
5.2.20.0170.03310.93
5.2.10.0130.04010.89
5.2.00.0130.04010.78
5.1.60.0070.04010.02
5.1.50.0170.03310.04
5.1.40.0100.03710.10
5.1.30.0130.03310.32
5.1.20.0130.03310.39
5.1.10.0130.03010.12
5.1.00.0200.02710.20
5.0.50.0030.0308.59
5.0.40.0130.0308.40
5.0.30.0070.0438.26
5.0.20.0030.0338.30
5.0.10.0000.0338.31
5.0.00.0070.0438.31
4.4.90.0030.0235.93
4.4.80.0070.0205.91
4.4.70.0030.0235.88
4.4.60.0030.0235.89
4.4.50.0070.0205.95
4.4.40.0000.0405.93
4.4.30.0070.0275.88
4.4.20.0030.0305.93
4.4.10.0070.0206.01
4.4.00.0000.0405.92
4.3.110.0070.0205.83
4.3.100.0030.0235.84
4.3.90.0070.0205.84
4.3.80.0000.0375.82
4.3.70.0070.0205.84
4.3.60.0000.0275.90
4.3.50.0030.0235.93
4.3.40.0070.0305.88
4.3.30.0030.0234.57
4.3.20.0000.0274.58
4.3.10.0030.0234.48
4.3.00.0130.0207.02

preferences:
45.98 ms | 400 KiB | 5 Q