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 = 2; $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) ) { for ($x = 0; (($x <= max($ssPagingStartCount, ($currentpageid + (int)($ssPagingCurrentCount/2)))) && ($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>"; } } } } 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.0160.00618.67
8.3.30.0100.01019.02
8.3.20.0090.00020.20
8.3.10.0030.00621.95
8.3.00.0000.01019.38
8.2.170.0040.01122.96
8.2.160.0140.00722.13
8.2.150.0120.00624.18
8.2.140.0150.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00819.56
8.2.110.0090.00019.17
8.2.100.0080.00417.75
8.2.90.0040.00419.36
8.2.80.0050.00317.97
8.2.70.0090.00017.50
8.2.60.0000.00818.04
8.2.50.0080.00018.07
8.2.40.0060.00320.07
8.2.30.0040.00418.00
8.2.20.0000.00817.70
8.2.10.0040.00418.16
8.2.00.0090.00017.80
8.1.270.0030.00720.67
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0070.00323.83
8.1.230.0030.00917.77
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0000.01017.23
8.1.190.0060.00317.13
8.1.180.0050.00218.10
8.1.170.0000.00818.55
8.1.160.0000.00721.98
8.1.150.0030.00518.59
8.1.140.0000.00717.35
8.1.130.0040.00417.87
8.1.120.0040.00417.52
8.1.110.0000.00817.45
8.1.100.0050.00217.48
8.1.90.0060.00317.40
8.1.80.0040.00417.45
8.1.70.0030.00317.41
8.1.60.0030.00517.53
8.1.50.0040.00417.55
8.1.40.0060.00217.56
8.1.30.0000.00817.60
8.1.20.0040.00417.54
8.1.10.0090.00317.44
8.1.00.0030.00617.32
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0030.00318.39
8.0.270.0040.00417.26
8.0.260.0040.00417.17
8.0.250.0000.00716.85
8.0.240.0080.00016.87
8.0.230.0030.00316.88
8.0.220.0030.00316.79
8.0.210.0050.00316.79
8.0.200.0030.00317.02
8.0.190.0000.00816.94
8.0.180.0020.00516.93
8.0.170.0070.00016.94
8.0.160.0040.00416.98
8.0.150.0000.00816.85
8.0.140.0000.00716.90
8.0.130.0030.00313.27
8.0.120.0080.00016.85
8.0.110.0070.00016.84
8.0.100.0050.00216.86
8.0.90.0000.00816.95
8.0.80.0100.00716.86
8.0.70.0000.00716.98
8.0.60.0000.00716.88
8.0.50.0050.00316.93
8.0.30.0120.01217.14
8.0.20.0130.01017.40
8.0.10.0040.00416.95
8.0.00.0110.00616.65
7.4.330.0050.00015.03
7.4.320.0050.00216.64
7.4.300.0030.00516.57
7.4.290.0000.00816.55
7.4.280.0000.00816.49
7.4.270.0070.00016.58
7.4.260.0070.00016.58
7.4.250.0030.00516.49
7.4.240.0040.00416.52
7.4.230.0000.00716.49
7.4.220.0120.00616.61
7.4.210.0070.00716.52
7.4.200.0040.00416.50
7.4.160.0130.00316.30
7.4.150.0090.00917.40
7.4.140.0140.00617.86
7.4.130.0090.00716.49
7.4.120.0080.01016.37
7.4.110.0070.01016.51
7.4.100.0170.00316.50
7.4.90.0120.00916.52
7.4.80.0130.00519.39
7.4.70.0030.01316.48
7.4.60.0040.01216.60
7.4.50.0030.00316.39
7.4.40.0100.00716.48
7.4.30.0060.01216.45
7.4.00.0030.01114.78
7.3.330.0000.00613.07
7.3.320.0080.00813.07
7.3.310.0030.00316.15
7.3.300.0040.00416.23
7.3.290.0080.00616.32
7.3.280.0070.01016.33
7.3.270.0120.01217.40
7.3.260.0070.01116.61
7.3.250.0110.00916.58
7.3.240.0110.00616.57
7.3.230.0070.01116.39
7.3.210.0140.00716.36
7.3.200.0120.00919.39
7.3.190.0130.00316.50
7.3.180.0090.01216.42
7.3.170.0060.01216.45
7.3.160.0060.01016.63
7.3.10.0080.00416.71
7.3.00.0040.00916.27
7.2.330.0100.00816.46
7.2.320.0090.01216.45
7.2.310.0000.01716.60
7.2.300.0060.01016.77
7.2.290.0080.00816.81
7.2.130.0070.00716.75
7.2.120.0070.00716.97
7.2.110.0040.00816.88
7.2.100.0040.00817.02
7.2.90.0070.00716.80
7.2.80.0030.01016.75
7.2.70.0030.01016.47
7.2.60.0060.00616.87
7.2.50.0030.00717.03
7.2.40.0060.00317.05
7.2.30.0130.00316.96
7.2.20.0070.00716.80
7.2.10.0040.00717.03
7.2.00.0050.00918.07
7.1.250.0060.00615.79
7.1.200.0050.01115.71
7.1.100.0090.00318.32
7.1.70.0000.01517.09
7.1.60.0100.01319.46
7.1.50.0270.00734.85
7.1.00.0000.07322.27
7.0.200.0090.00516.52
7.0.140.0000.03722.00
7.0.60.0130.07719.97
7.0.50.0030.08017.72
7.0.40.0100.08320.02
7.0.30.0300.06720.34
7.0.20.0330.08020.18
7.0.10.0230.05320.20
7.0.00.0030.04020.17
5.6.280.0070.06720.90
5.6.210.0070.08020.52
5.6.200.0230.06318.16
5.6.190.0070.04320.41
5.6.180.0200.05720.35
5.6.170.0200.04720.50
5.6.160.0200.07320.71
5.6.150.0070.03718.15
5.6.140.0070.06718.18
5.6.130.0000.04318.16
5.6.120.0070.08321.02
5.6.110.0170.06721.07
5.6.100.0030.07021.07
5.6.90.0030.08721.00
5.6.80.0070.08020.34
5.6.70.0030.04020.41
5.5.350.0170.06720.42
5.5.340.0000.04317.98
5.5.330.0070.04320.29
5.5.320.0300.07320.32
5.5.310.0200.06720.16
5.5.300.0100.07017.89
5.5.290.0170.07318.01
5.5.280.0030.09320.78
5.5.270.0070.07320.79
5.5.260.0100.08720.89
5.5.250.0270.04020.68
5.5.240.0070.05720.26
5.4.450.0500.07019.55
5.4.440.0170.05719.52
5.4.430.0230.04719.23
5.4.420.0100.06019.44
5.4.410.0130.05319.31
5.4.400.0230.05018.74
5.4.390.0270.04718.70
5.4.380.0270.05018.45
5.4.370.0370.03318.68
5.4.360.0270.06718.72
5.4.350.0370.03718.72
5.4.340.0130.08018.68
5.4.320.0300.06318.46
5.4.310.0200.07318.51
5.4.300.0230.07018.52
5.4.290.0270.05018.59
5.4.280.0170.05018.71
5.4.270.0030.06318.68
5.4.260.0270.07318.62
5.4.250.0230.05018.70
5.4.240.0270.05718.70
5.4.230.0200.04718.71
5.4.220.0200.05018.48
5.4.210.0230.04318.48
5.4.200.0300.03316.57
5.4.190.0200.05018.72
5.4.180.0270.04018.48
5.4.170.0230.04718.51
5.4.160.0030.06318.48
5.4.150.0200.04718.50
5.4.140.0200.04716.32
5.4.130.0100.06016.08
5.4.120.0130.05016.13
5.4.110.0170.04716.26
5.4.100.0300.04716.16
5.4.90.0130.05016.09
5.4.80.0330.05016.18
5.4.70.0200.04716.06
5.4.60.0230.06016.17
5.4.50.0370.04016.17
5.4.40.0230.05716.17
5.4.30.0100.05316.23
5.4.20.0100.05716.32
5.4.10.0130.05016.01
5.4.00.0130.05315.80
5.3.290.0200.05314.63
5.3.280.0130.05714.68
5.3.270.0230.06714.65
5.3.260.0230.07014.62
5.3.250.0470.04314.54
5.3.240.0300.06014.65
5.3.230.0230.04314.59
5.3.220.0230.05014.57
5.3.210.0170.05314.62
5.3.200.0200.04714.60
5.3.190.0230.04714.48
5.3.180.0100.05714.56
5.3.170.0170.05014.49
5.3.160.0100.05714.51
5.3.150.0130.05314.51
5.3.140.0070.06014.61
5.3.130.0230.04314.64
5.3.120.0230.04714.46
5.3.110.0200.05014.55
5.3.100.0200.04713.98
5.3.90.0100.05713.91
5.3.80.0170.04714.00
5.3.70.0130.05013.91
5.3.60.0100.05313.97
5.3.50.0100.05313.90
5.3.40.0170.05013.94
5.3.30.0230.06313.89
5.3.20.0130.07313.79
5.3.10.0270.06013.55
5.3.00.0230.04313.67
5.2.170.0070.04711.18
5.2.160.0030.05011.19
5.2.150.0230.03711.28
5.2.140.0130.04011.05
5.2.130.0030.04711.07
5.2.120.0170.03311.08
5.2.110.0130.04011.26
5.2.100.0170.04011.01
5.2.90.0170.03711.16
5.2.80.0170.05011.05
5.2.70.0130.04011.08
5.2.60.0130.04011.20
5.2.50.0070.04710.93
5.2.40.0100.04011.05
5.2.30.0200.05011.13
5.2.20.0070.05010.89
5.2.10.0070.04310.98
5.2.00.0270.03710.74
5.1.60.0030.04010.09
5.1.50.0130.03310.20
5.1.40.0170.03010.04
5.1.30.0100.04310.40
5.1.20.0070.04010.48
5.1.10.0100.03710.10
5.1.00.0170.03010.14
5.0.50.0070.0408.69
5.0.40.0130.0338.44
5.0.30.0170.0478.42
5.0.20.0230.0208.33
5.0.10.0070.0278.31
5.0.00.0030.0508.30
4.4.90.0130.0305.87
4.4.80.0030.0275.91
4.4.70.0070.0205.94
4.4.60.0070.0205.89
4.4.50.0100.0175.97
4.4.40.0070.0335.94
4.4.30.0030.0235.88
4.4.20.0000.0275.90
4.4.10.0070.0205.96
4.4.00.0100.0305.94
4.3.110.0000.0275.87
4.3.100.0030.0235.78
4.3.90.0100.0205.81
4.3.80.0030.0405.82
4.3.70.0030.0235.81
4.3.60.0030.0235.82
4.3.50.0000.0275.83
4.3.40.0030.0375.80
4.3.30.0000.0234.57
4.3.20.0070.0204.55
4.3.10.0000.0234.51
4.3.00.0130.0207.02

preferences:
110.54 ms | 400 KiB | 5 Q