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.0070.01416.75
8.3.50.0070.01222.00
8.3.40.0180.00418.70
8.3.30.0150.00019.04
8.3.20.0080.00020.21
8.3.10.0040.01121.67
8.3.00.0040.00419.10
8.2.180.0140.00418.16
8.2.170.0120.00322.96
8.2.160.0070.00722.20
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0050.00319.66
8.2.110.0030.00622.25
8.2.100.0080.00817.72
8.2.90.0030.00519.34
8.2.80.0000.00817.97
8.2.70.0030.00717.63
8.2.60.0030.00618.05
8.2.50.0000.01018.07
8.2.40.0060.00319.94
8.2.30.0040.00418.07
8.2.20.0000.00717.87
8.2.10.0060.00318.23
8.2.00.0000.00717.80
8.1.280.0160.00625.92
8.1.270.0120.00420.61
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00023.91
8.1.230.0080.00423.88
8.1.220.0050.00317.79
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0000.00920.12
8.1.160.0000.00722.05
8.1.150.0040.00418.92
8.1.140.0050.00317.38
8.1.130.0000.00717.84
8.1.120.0000.00817.52
8.1.110.0040.00417.49
8.1.100.0040.00417.34
8.1.90.0040.00417.40
8.1.80.0040.00417.43
8.1.70.0000.00717.36
8.1.60.0040.00417.58
8.1.50.0060.00317.52
8.1.40.0060.00317.53
8.1.30.0000.00817.68
8.1.20.0040.00417.56
8.1.10.0000.00817.48
8.1.00.0040.00417.44
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0070.00018.46
8.0.270.0040.00417.14
8.0.260.0000.00617.18
8.0.250.0030.00316.88
8.0.240.0030.00316.93
8.0.230.0050.00317.01
8.0.220.0030.00316.85
8.0.210.0040.00416.92
8.0.200.0040.00416.93
8.0.190.0040.00417.01
8.0.180.0050.00316.84
8.0.170.0040.00416.94
8.0.160.0040.00416.89
8.0.150.0040.00416.86
8.0.140.0000.00816.85
8.0.130.0000.00613.38
8.0.120.0080.00016.86
8.0.110.0050.00216.82
8.0.100.0040.00416.80
8.0.90.0000.00716.82
8.0.80.0180.00316.93
8.0.70.0040.00416.89
8.0.60.0050.00316.80
8.0.50.0040.00416.77
8.0.30.0120.01016.99
8.0.20.0140.02617.41
8.0.10.0040.00416.88
8.0.00.0140.00316.81
7.4.330.0000.00515.03
7.4.320.0000.00616.59
7.4.300.0070.00016.50
7.4.290.0070.00016.65
7.4.280.0070.00016.45
7.4.270.0040.00416.45
7.4.260.0030.00313.25
7.4.250.0000.00816.49
7.4.240.0020.00516.55
7.4.230.0030.00316.59
7.4.220.0100.00716.50
7.4.210.0080.00716.63
7.4.200.0040.00416.59
7.4.160.0030.01316.36
7.4.150.0130.00617.40
7.4.140.0180.00317.86
7.4.130.0100.00916.60
7.4.120.0090.00916.59
7.4.110.0060.01316.29
7.4.100.0160.00616.69
7.4.90.0090.00916.48
7.4.80.0090.00919.39
7.4.70.0170.00616.46
7.4.60.0040.01516.64
7.4.50.0020.00216.20
7.4.40.0070.01016.60
7.4.30.0210.00416.52
7.4.00.0140.00014.84
7.3.330.0030.00313.27
7.3.320.0070.00713.18
7.3.310.0000.00716.30
7.3.300.0060.00016.38
7.3.290.0070.00016.27
7.3.280.0100.01016.37
7.3.270.0030.01617.40
7.3.260.0100.00716.29
7.3.250.0040.01316.31
7.3.240.0060.01216.69
7.3.230.0090.00916.47
7.3.210.0130.00816.41
7.3.200.0030.01419.39
7.3.190.0080.00816.43
7.3.180.0030.01316.64
7.3.170.0030.01516.38
7.3.160.0150.00916.21
7.2.330.0060.01216.82
7.2.320.0070.01116.80
7.2.310.0170.00416.59
7.2.300.0070.01016.77
7.2.290.0190.00316.58
7.2.00.0080.00319.17
7.1.100.0060.00618.34
7.1.70.0000.00717.30
7.1.60.0070.01819.46
7.1.50.0080.00316.96
7.1.00.0070.07322.30
7.0.200.0030.00716.68
7.0.140.0000.03722.04
7.0.60.0300.07719.92
7.0.50.0030.07717.90
7.0.40.0070.05320.24
7.0.30.0530.05020.18
7.0.20.0200.04020.12
7.0.10.0170.03720.09
7.0.00.0130.05320.08
5.6.280.0130.06020.89
5.6.210.0030.04020.51
5.6.200.0030.05018.22
5.6.190.0070.04720.41
5.6.180.0230.07720.77
5.6.170.0270.08020.35
5.6.160.0070.03718.17
5.6.150.0100.07718.21
5.6.140.0070.04018.14
5.6.130.0070.05018.15
5.6.120.0100.08021.11
5.6.110.0130.05320.92
5.6.100.0070.04720.86
5.6.90.0070.05321.13
5.6.80.0100.07020.41
5.5.350.0170.06320.34
5.5.340.0030.03717.91
5.5.330.0100.04020.23
5.5.320.0300.06320.29
5.5.310.0300.04320.27
5.5.300.0030.05017.98
5.5.290.0070.09717.91
5.5.280.0100.05720.78
5.5.270.0030.05020.89
5.5.260.0130.04320.72
5.5.250.0030.08320.62
5.5.240.0170.07720.16
5.4.450.0270.04719.64
5.4.440.0270.05719.46
5.4.430.0130.06019.45
5.4.420.0270.05319.42
5.4.410.0130.08019.35
5.4.400.0170.05018.70
5.4.390.0170.05718.57
5.4.380.0170.05318.55
5.4.370.0130.05318.64
5.4.360.0330.03718.77
5.4.350.0230.04718.50
5.4.340.0170.06018.68
5.4.320.0270.04318.47
5.4.310.0170.05318.68
5.4.300.0200.05018.50
5.4.290.0130.05318.68
5.4.280.0170.05318.71
5.4.270.0230.04318.71
5.4.260.0130.05318.54
5.4.250.0170.05318.47
5.4.240.0330.04318.50
5.4.230.0170.05018.72
5.4.220.0230.07318.49
5.4.210.0230.06318.68
5.4.200.0170.04716.73
5.4.190.0100.05718.72
5.4.180.0200.05018.65
5.4.170.0200.05018.54
5.4.160.0170.05018.56
5.4.150.0130.06318.57
5.4.140.0200.05716.06
5.4.130.0100.05716.16
5.4.120.0230.04316.02
5.4.110.0170.04716.09
5.4.100.0230.04316.23
5.4.90.0270.04016.09
5.4.80.0270.04016.22
5.4.70.0270.04316.15
5.4.60.0200.04716.11
5.4.50.0130.05016.24
5.4.40.0100.05316.18
5.4.30.0100.05716.03
5.4.20.0130.05316.05
5.4.10.0170.05016.20
5.4.00.0100.05315.81
5.3.290.0100.06314.77
5.3.280.0230.04714.59
5.3.270.0130.05314.55
5.3.260.0200.06314.59
5.3.250.0200.04714.52
5.3.240.0170.05014.61
5.3.230.0170.05314.59
5.3.220.0170.05714.57
5.3.210.0200.05314.57
5.3.200.0170.05014.55
5.3.190.0170.05014.65
5.3.180.0070.06014.54
5.3.170.0100.05714.59
5.3.160.0230.04314.50
5.3.150.0200.05014.64
5.3.140.0130.05314.54
5.3.130.0100.06014.56
5.3.120.0100.06014.54
5.3.110.0100.05714.50
5.3.100.0200.05014.01
5.3.90.0170.05014.02
5.3.80.0330.03313.92
5.3.70.0070.06013.97
5.3.60.0030.06013.95
5.3.50.0170.05013.89
5.3.40.0230.04313.95
5.3.30.0230.04013.87
5.3.20.0100.06313.70
5.3.10.0200.04013.61
5.3.00.0230.04313.76
5.2.170.0200.04011.07
5.2.160.0170.04311.31
5.2.150.0200.04711.20
5.2.140.0100.04711.16
5.2.130.0070.04711.05
5.2.120.0130.04011.15
5.2.110.0100.04311.12
5.2.100.0030.04711.18
5.2.90.0070.04711.04
5.2.80.0130.04311.11
5.2.70.0270.03011.09
5.2.60.0070.05011.02
5.2.50.0070.04711.07
5.2.40.0170.04311.16
5.2.30.0100.06011.14
5.2.20.0100.04011.12
5.2.10.0100.04010.85
5.2.00.0100.04010.91
5.1.60.0070.03710.11
5.1.50.0070.04010.21
5.1.40.0100.03310.09
5.1.30.0170.03310.35
5.1.20.0100.03710.49
5.1.10.0000.04710.16
5.1.00.0100.03310.07
5.0.50.0100.0278.59
5.0.40.0030.0378.56
5.0.30.0100.0408.27
5.0.20.0070.0278.41
5.0.10.0100.0278.32
5.0.00.0070.0408.36
4.4.90.0030.0235.92
4.4.80.0000.0275.93
4.4.70.0030.0235.89
4.4.60.0070.0235.95
4.4.50.0000.0275.91
4.4.40.0030.0375.87
4.4.30.0030.0235.95
4.4.20.0030.0235.95
4.4.10.0030.0235.95
4.4.00.0100.0305.97
4.3.110.0070.0205.90
4.3.100.0100.0205.77
4.3.90.0070.0205.84
4.3.80.0030.0375.83
4.3.70.0100.0175.89
4.3.60.0070.0205.86
4.3.50.0070.0205.89
4.3.40.0070.0305.77
4.3.30.0070.0204.59
4.3.20.0030.0234.57
4.3.10.0000.0234.62
4.3.00.0070.0207.02

preferences:
49.89 ms | 401 KiB | 5 Q