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 = 2; $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); if ( $ssPagingCurrentCountFrom < 0 ) $ssPagingCurrentCountFrom = 0; $ssPagingCurrentCountTo = $currentpageid + (int)($ssPagingCurrentCount/2); if ( $ssPagingCurrentCountTo > $totalpages ) $ssPagingCurrentCountTo = $totalpages; if ( ($currentpageid >= 0) && ($currentpageid < ($ssPagingStartCount + (int)($ssPagingCurrentCount/2))) ) { 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.0040.01118.58
8.3.30.0170.00019.04
8.3.20.0070.00020.16
8.3.10.0060.00321.98
8.3.00.0060.00319.38
8.2.170.0070.00722.96
8.2.160.0160.00319.46
8.2.150.0040.01124.18
8.2.140.0050.00324.66
8.2.130.0060.00326.16
8.2.120.0030.00519.76
8.2.110.0070.00320.98
8.2.100.0090.00317.75
8.2.90.0000.00819.26
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0030.00620.07
8.2.30.0080.00018.19
8.2.20.0030.00617.85
8.2.10.0030.00518.20
8.2.00.0000.00717.77
8.1.270.0190.00020.64
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00623.96
8.1.230.0080.00318.76
8.1.220.0050.00317.78
8.1.210.0050.00318.77
8.1.200.0050.00517.22
8.1.190.0030.00516.99
8.1.180.0030.00518.10
8.1.170.0040.00420.34
8.1.160.0070.00322.11
8.1.150.0020.00518.79
8.1.140.0040.00417.40
8.1.130.0000.00717.85
8.1.120.0070.00017.46
8.1.110.0070.00017.38
8.1.100.0070.00017.43
8.1.90.0070.00017.50
8.1.80.0030.00517.46
8.1.70.0070.00017.48
8.1.60.0030.00617.63
8.1.50.0060.00317.61
8.1.40.0000.00817.52
8.1.30.0030.00517.63
8.1.20.0030.00617.59
8.1.10.0070.00017.36
8.1.00.0040.00417.49
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0040.00418.52
8.0.270.0000.00717.21
8.0.260.0030.00317.16
8.0.250.0000.00716.85
8.0.240.0000.00716.97
8.0.230.0070.00016.88
8.0.220.0070.00016.91
8.0.210.0040.00416.82
8.0.200.0060.00016.84
8.0.190.0000.00717.02
8.0.180.0060.00316.97
8.0.170.0030.00516.94
8.0.160.0040.00416.88
8.0.150.0030.00316.88
8.0.140.0000.00716.80
8.0.130.0030.00313.30
8.0.120.0050.00316.83
8.0.110.0070.00016.79
8.0.100.0040.00416.95
8.0.90.0000.00716.90
8.0.80.0060.01016.93
8.0.70.0000.00916.81
8.0.60.0080.00016.89
8.0.50.0000.00816.80
8.0.30.0120.01317.10
8.0.20.0080.01117.40
8.0.10.0040.00416.97
8.0.00.0090.01216.83
7.4.330.0000.00515.12
7.4.320.0030.00316.53
7.4.300.0080.00016.63
7.4.290.0030.00316.67
7.4.280.0000.00716.61
7.4.270.0030.00316.52
7.4.260.0000.00716.59
7.4.250.0000.00716.35
7.4.240.0010.00616.60
7.4.230.0070.00016.71
7.4.220.0090.00916.67
7.4.210.0080.01216.62
7.4.200.0000.00716.62
7.4.160.0100.00616.36
7.4.150.0240.00017.40
7.4.140.0080.01017.86
7.4.130.0090.00916.46
7.4.120.0100.00816.47
7.4.110.0000.02016.54
7.4.100.0150.00616.36
7.4.90.0090.00916.52
7.4.80.0170.00019.39
7.4.70.0060.01016.51
7.4.60.0090.00616.44
7.4.50.0050.00316.52
7.4.40.0070.01116.61
7.4.30.0130.00916.48
7.4.10.0070.01314.88
7.4.00.0070.01114.79
7.3.330.0030.00313.16
7.3.320.0150.00013.23
7.3.310.0000.00716.39
7.3.300.0030.00316.33
7.3.290.0070.00716.33
7.3.280.0080.00916.34
7.3.270.0100.00717.40
7.3.260.0170.00316.57
7.3.250.0090.00916.45
7.3.240.0050.01116.25
7.3.230.0120.00616.39
7.3.210.0070.01016.54
7.3.200.0110.00519.39
7.3.190.0070.01116.51
7.3.180.0100.00716.43
7.3.170.0060.01416.61
7.3.160.0090.00616.60
7.3.130.0070.00714.83
7.3.120.0040.01514.82
7.3.110.0050.01314.83
7.3.100.0050.00514.97
7.3.90.0060.00714.85
7.3.80.0040.00914.84
7.3.70.0050.01014.67
7.3.60.0030.01014.85
7.3.50.0030.00914.81
7.3.40.0100.00314.73
7.3.30.0030.00914.65
7.3.20.0020.01016.68
7.3.10.0060.00616.47
7.3.00.0060.00816.64
7.2.330.0120.00716.46
7.2.320.0170.00016.48
7.2.310.0150.00316.73
7.2.300.0100.01016.46
7.2.290.0090.01216.50
7.2.260.0030.01715.15
7.2.250.0070.01115.16
7.2.240.0080.01014.97
7.2.230.0040.00915.09
7.2.220.0080.00615.26
7.2.210.0050.01215.13
7.2.200.0060.00815.06
7.2.190.0110.00414.94
7.2.180.0050.01215.13
7.2.170.0070.00915.07
7.2.160.0080.01015.22
7.2.150.0080.00717.04
7.2.140.0070.00616.92
7.2.130.0020.01217.03
7.2.120.0090.00616.98
7.2.110.0030.01116.86
7.2.100.0050.01216.74
7.2.90.0050.01117.00
7.2.80.0100.00516.91
7.2.70.0020.01216.68
7.2.60.0080.00816.93
7.2.50.0050.01117.04
7.2.40.0050.00917.09
7.2.30.0070.00916.90
7.2.20.0080.00516.71
7.2.10.0030.00716.89
7.2.00.0050.00817.61
7.1.330.0040.00915.71
7.1.320.0080.00515.79
7.1.310.0050.01015.88
7.1.300.0080.00815.82
7.1.290.0050.00915.62
7.1.280.0070.00815.75
7.1.270.0050.00915.77
7.1.260.0050.00815.82
7.1.250.0020.01315.76
7.1.240.0090.00915.93
7.1.230.0030.01315.69
7.1.220.0040.01115.79
7.1.210.0060.01015.85
7.1.200.0050.01015.79
7.1.190.0060.00315.98
7.1.180.0060.00315.91
7.1.170.0030.01515.93
7.1.160.0090.00315.86
7.1.150.0060.00615.57
7.1.140.0120.00015.95
7.1.130.0090.00615.75
7.1.120.0090.00615.66
7.1.110.0050.00515.71
7.1.100.0020.00917.13
7.1.90.0070.00715.74
7.1.80.0000.01515.92
7.1.70.0040.01216.42
7.1.60.0090.01117.73
7.1.50.0110.00525.36
7.1.40.0120.00415.69
7.1.30.0120.00615.63
7.1.20.0070.00315.96
7.1.10.0040.00815.92
7.1.00.0050.03919.04
7.0.330.0070.00715.50
7.0.320.0070.00715.38
7.0.310.0040.00715.42
7.0.300.0040.01115.43
7.0.290.0070.00715.29
7.0.280.0060.00815.43
7.0.270.0030.01015.19
7.0.260.0070.00715.48
7.0.250.0100.00715.61
7.0.240.0030.01015.46
7.0.230.0000.00815.39
7.0.220.0070.01115.50
7.0.210.0100.00315.45
7.0.200.0070.00616.17
7.0.190.0040.00915.56
7.0.180.0030.01015.36
7.0.170.0120.00615.59
7.0.160.0000.01015.48
7.0.150.0000.01515.64
7.0.140.0070.01818.82
7.0.130.0000.01315.38
7.0.120.0030.01015.21
7.0.110.0030.01015.18
7.0.100.0070.00715.34
7.0.90.0000.01115.37
7.0.80.0000.01015.16
7.0.70.0080.04217.62
7.0.60.0080.04417.77
7.0.50.0050.04016.67
7.0.40.0040.05017.00
7.0.30.0150.04316.85
7.0.20.0180.02516.90
7.0.10.0230.03716.88
7.0.00.0080.02216.91
5.6.400.0030.01014.51
5.6.390.0030.01014.36
5.6.380.0060.00613.99
5.6.370.0070.00714.52
5.6.360.0040.01414.73
5.6.350.0060.00614.64
5.6.340.0070.00714.25
5.6.330.0090.00614.33
5.6.320.0090.00914.01
5.6.310.0030.00714.50
5.6.300.0000.00914.42
5.6.290.0100.00714.32
5.6.280.0050.03917.68
5.6.270.0070.00714.58
5.6.260.0090.00614.26
5.6.250.0000.01114.41
5.6.240.0000.01314.63
5.6.230.0070.00714.42
5.6.220.0040.01114.44
5.6.210.0110.04217.53
5.6.200.0070.04516.17
5.6.190.0060.02417.40
5.6.180.0150.02117.60
5.6.170.0130.04717.45
5.6.160.0020.05017.30
5.6.150.0090.04016.40
5.6.140.0030.04916.33
5.6.130.0140.04016.23
5.6.120.0070.04817.63
5.6.110.0100.03717.70
5.6.100.0070.04417.68
5.6.90.0070.04817.75
5.6.80.0090.04017.32
5.6.70.0120.03817.40
5.6.60.0100.00314.27
5.6.50.0060.00614.27
5.6.40.0030.00914.16
5.6.30.0070.00714.17
5.6.20.0030.01214.40
5.6.10.0070.00714.22
5.6.00.0100.00314.25
5.5.380.0000.01014.53
5.5.370.0030.01014.35
5.5.360.0040.00714.29
5.5.350.0050.04117.39
5.5.340.0070.03316.20
5.5.330.0080.03817.21
5.5.320.0050.04017.35
5.5.310.0150.04417.39
5.5.300.0060.02616.18
5.5.290.0080.04616.24
5.5.280.0080.04217.62
5.5.270.0100.03817.61
5.5.260.0070.04317.61
5.5.250.0170.03217.51
5.5.240.0050.04617.17
5.5.230.0000.01514.39
5.5.220.0060.00614.34
5.5.210.0040.01114.49
5.5.200.0090.00314.02
5.5.190.0030.01013.98
5.5.180.0000.00814.46
5.5.170.0120.00314.17
5.5.160.0030.01314.32
5.5.150.0070.00714.46
5.5.140.0030.01014.15
5.5.130.0090.00314.47
5.5.120.0040.01414.05
5.5.110.0030.01214.24
5.5.100.0130.00314.17
5.5.90.0070.00314.35
5.5.80.0060.00914.38
5.5.70.0060.00314.31
5.5.60.0060.00614.35
5.5.50.0070.00314.13
5.5.40.0000.01414.02
5.5.30.0030.00914.28
5.5.20.0100.00314.27
5.5.10.0080.00614.35
5.5.00.0090.00414.08
5.4.450.0310.03415.37
5.4.440.0070.03415.11
5.4.430.0050.03515.13
5.4.420.0100.02815.41
5.4.410.0030.03715.20
5.4.400.0070.03014.86
5.4.390.0050.03914.72
5.4.380.0130.02314.69
5.4.370.0080.03014.86
5.4.360.0030.03314.77
5.4.350.0070.03214.92
5.4.340.0150.03014.89
5.4.330.0030.00711.05
5.4.320.0090.03214.71
5.4.310.0100.02914.74
5.4.300.0120.02714.90
5.4.290.0070.03014.80
5.4.280.0130.02514.88
5.4.270.0100.03114.93
5.4.260.0070.03514.90
5.4.250.0070.03214.87
5.4.240.0120.02814.70
5.4.230.0130.03014.73
5.4.220.0140.02614.78
5.4.210.0080.03314.61
5.4.200.0140.02313.68
5.4.190.0080.03014.68
5.4.180.0180.02014.90
5.4.170.0150.02514.98
5.4.160.0100.03214.91
5.4.150.0100.03314.77
5.4.140.0070.03113.69
5.4.130.0100.02413.47
5.4.120.0080.03013.79
5.4.110.0120.02613.83
5.4.100.0080.03013.56
5.4.90.0120.03513.62
5.4.80.0110.02313.65
5.4.70.0080.03013.63
5.4.60.0080.02813.69
5.4.50.0100.02813.45
5.4.40.0070.03013.70
5.4.30.0130.02413.53
5.4.20.0130.02513.68
5.4.10.0100.02513.70
5.4.00.0130.02513.30
5.3.290.0200.05014.77
5.3.280.0130.06014.70
5.3.270.0170.05014.58
5.3.260.0130.05314.57
5.3.250.0230.04314.71
5.3.240.0130.05714.55
5.3.230.0170.06314.55
5.3.220.0200.04714.61
5.3.210.0170.05014.68
5.3.200.0130.05314.63
5.3.190.0100.05714.54
5.3.180.0100.05314.57
5.3.170.0130.05314.48
5.3.160.0130.05714.56
5.3.150.0100.06014.66
5.3.140.0100.05314.62
5.3.130.0130.05314.48
5.3.120.0170.05314.50
5.3.110.0170.05014.64
5.3.100.0170.04714.03
5.3.90.0100.05314.13
5.3.80.0230.04013.98
5.3.70.0230.04314.13
5.3.60.0130.05013.93
5.3.50.0230.05014.07
5.3.40.0200.04713.89
5.3.30.0130.05013.99
5.3.20.0130.05013.60
5.3.10.0200.04313.75
5.3.00.0070.05713.62
5.2.170.0100.04711.14
5.2.160.0030.05011.13
5.2.150.0170.05011.16
5.2.140.0070.04711.09
5.2.130.0230.03011.09
5.2.120.0170.03311.15
5.2.110.0070.04311.15
5.2.100.0130.04011.27
5.2.90.0170.03311.10
5.2.80.0100.04311.26
5.2.70.0100.04311.02
5.2.60.0130.04011.20
5.2.50.0100.04311.01
5.2.40.0030.04710.96
5.2.30.0100.04010.94
5.2.20.0130.04011.12
5.2.10.0170.03310.88
5.2.00.0100.04010.93
5.1.60.0070.03310.02
5.1.50.0100.03310.03
5.1.40.0100.03310.19
5.1.30.0100.03310.46
5.1.20.0070.04010.34
5.1.10.0100.04310.12
5.1.00.0170.03010.06
5.0.50.0100.0308.74
5.0.40.0130.0238.50
5.0.30.0070.0438.36
5.0.20.0100.0238.41
5.0.10.0100.0278.19
5.0.00.0170.0408.25
4.4.90.0030.0235.89
4.4.80.0070.0235.95
4.4.70.0030.0275.91
4.4.60.0030.0305.89
4.4.50.0030.0305.89
4.4.40.0070.0435.93
4.4.30.0100.0205.96
4.4.20.0030.0306.06
4.4.10.0030.0276.07
4.4.00.0100.0335.95
4.3.110.0100.0205.90
4.3.100.0030.0235.88
4.3.90.0070.0205.82
4.3.80.0070.0335.82
4.3.70.0070.0205.81
4.3.60.0030.0235.84
4.3.50.0030.0275.88
4.3.40.0070.0335.87
4.3.30.0000.0274.66
4.3.20.0000.0274.56
4.3.10.0030.0234.49
4.3.00.0100.0237.02

preferences:
40.76 ms | 400 KiB | 5 Q