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"; $currentpageid = $nmstart = $ss; $nrtotal = 23; $nrposts = 1; $pages = ''; $ssPagingStartCount = 2; $ssPagingCurrentCount = 4; $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-1)/2) - 1; if ( $ssPagingCurrentCountFrom < 0 ) $ssPagingCurrentCountFrom = 0; $ssPagingCurrentCountTo = $currentpageid + (int)(($ssPagingCurrentCount-1)/2) + 1; if ( $ssPagingCurrentCountTo > $totalpages ) $ssPagingCurrentCountTo = $totalpages; if ( ($currentpageid >= 0) && ($currentpageid <= ($ssPagingStartCount + (int)(($ssPagingCurrentCount-1)/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.0100.01016.48
8.3.50.0150.00522.05
8.3.40.0040.01118.81
8.3.30.0070.01119.22
8.3.20.0040.00420.33
8.3.10.0040.00421.81
8.3.00.0090.00019.25
8.2.180.0140.00716.50
8.2.170.0160.00022.96
8.2.160.0070.00722.13
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.66
8.2.110.0070.00321.03
8.2.100.0060.00617.63
8.2.90.0040.00419.24
8.2.80.0030.00517.97
8.2.70.0060.00317.38
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0000.00920.01
8.2.30.0040.00418.14
8.2.20.0030.00517.64
8.2.10.0000.00818.01
8.2.00.0000.00817.75
8.1.280.0110.01125.92
8.1.270.0060.01020.53
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00623.84
8.1.230.0080.00419.07
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0050.00817.25
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0000.00820.52
8.1.160.0040.00421.91
8.1.150.0000.00818.82
8.1.140.0040.00417.41
8.1.130.0030.00617.48
8.1.120.0000.00717.47
8.1.110.0070.00017.47
8.1.100.0040.00417.38
8.1.90.0060.00317.43
8.1.80.0040.00417.46
8.1.70.0070.00017.46
8.1.60.0030.00517.57
8.1.50.0040.00417.55
8.1.40.0000.00817.53
8.1.30.0040.00417.58
8.1.20.0000.00717.59
8.1.10.0050.00317.36
8.1.00.0080.00017.51
8.0.300.0030.00518.77
8.0.290.0040.00416.63
8.0.280.0000.00718.51
8.0.270.0040.00417.27
8.0.260.0070.00016.76
8.0.250.0030.00516.95
8.0.240.0030.00316.99
8.0.230.0070.00016.94
8.0.220.0040.00416.84
8.0.210.0030.00416.81
8.0.200.0040.00416.92
8.0.190.0050.00316.96
8.0.180.0000.00816.82
8.0.170.0040.00416.81
8.0.160.0000.00716.96
8.0.150.0000.00716.81
8.0.140.0000.00816.77
8.0.130.0030.00313.29
8.0.120.0000.00916.77
8.0.110.0070.00016.88
8.0.100.0030.00516.77
8.0.90.0000.00816.96
8.0.80.0030.01216.84
8.0.70.0050.00316.90
8.0.60.0000.00716.86
8.0.50.0040.00416.91
8.0.30.0080.01516.91
8.0.20.0190.00917.40
8.0.10.0080.00016.84
8.0.00.0120.00616.77
7.4.330.0030.00315.07
7.4.320.0030.00316.45
7.4.300.0000.00816.47
7.4.290.0040.00416.55
7.4.280.0030.00316.49
7.4.270.0030.00316.48
7.4.260.0030.00316.41
7.4.250.0000.00816.58
7.4.240.0020.00516.51
7.4.230.0000.00716.43
7.4.220.0120.00616.64
7.4.210.0060.01216.55
7.4.200.0030.00316.55
7.4.160.0100.00716.48
7.4.150.0070.01217.40
7.4.140.0120.00517.86
7.4.130.0120.00616.55
7.4.120.0080.00916.57
7.4.110.0120.00616.63
7.4.100.0110.01316.46
7.4.90.0110.00716.35
7.4.80.0150.00619.39
7.4.70.0090.00916.68
7.4.60.0120.00516.41
7.4.50.0040.00016.34
7.4.40.0060.01316.66
7.4.30.0130.00316.48
7.4.10.0030.01314.81
7.4.00.0080.01114.99
7.3.330.0050.00013.08
7.3.320.0050.01013.19
7.3.310.0060.00016.19
7.3.300.0040.00416.39
7.3.290.0000.00716.41
7.3.280.0070.01216.33
7.3.270.0090.00917.40
7.3.260.0070.01116.45
7.3.250.0060.01516.43
7.3.240.0120.00316.52
7.3.230.0070.01016.39
7.3.210.0100.00716.62
7.3.200.0060.01419.39
7.3.190.0140.00316.52
7.3.180.0000.01716.27
7.3.170.0120.00616.35
7.3.160.0080.00816.25
7.3.130.0120.00614.93
7.3.120.0040.01215.07
7.3.110.0030.01614.91
7.3.100.0040.01114.96
7.3.90.0070.00714.85
7.3.80.0000.01414.93
7.3.70.0040.01114.78
7.3.60.0040.00814.68
7.3.50.0110.00414.96
7.3.40.0030.00615.09
7.3.30.0030.01114.88
7.3.20.0030.00916.85
7.3.10.0080.00416.41
7.3.00.0110.00516.58
7.2.330.0100.00816.42
7.2.320.0080.01116.73
7.2.310.0150.00416.44
7.2.300.0140.00616.61
7.2.290.0150.00316.73
7.2.260.0100.00714.92
7.2.250.0110.00715.35
7.2.240.0060.00915.01
7.2.230.0070.00715.22
7.2.220.0130.00315.30
7.2.210.0000.01315.21
7.2.200.0030.01415.02
7.2.190.0030.00615.13
7.2.180.0110.00415.05
7.2.170.0060.01215.05
7.2.160.0040.00714.91
7.2.150.0100.00317.02
7.2.140.0060.00317.01
7.2.130.0080.00616.98
7.2.120.0070.00716.74
7.2.110.0090.00716.78
7.2.100.0110.00316.78
7.2.90.0100.00516.89
7.2.80.0040.00616.92
7.2.70.0020.00816.84
7.2.60.0050.00716.81
7.2.50.0030.01016.86
7.2.40.0030.00916.74
7.2.30.0070.00717.00
7.2.20.0130.00416.98
7.2.10.0060.00716.82
7.2.00.0010.01117.61
7.1.330.0060.00615.95
7.1.320.0040.00715.85
7.1.310.0040.00815.66
7.1.300.0110.00315.80
7.1.290.0070.00315.92
7.1.280.0030.01015.86
7.1.270.0070.01015.87
7.1.260.0040.00715.64
7.1.250.0070.00315.68
7.1.240.0030.00715.88
7.1.230.0030.01015.89
7.1.220.0070.01015.59
7.1.210.0080.00316.02
7.1.200.0060.00615.53
7.1.190.0030.00615.97
7.1.180.0070.00316.01
7.1.170.0070.00315.72
7.1.160.0080.00315.89
7.1.150.0030.00815.72
7.1.140.0100.00315.69
7.1.130.0000.01215.86
7.1.120.0030.00715.90
7.1.110.0040.00815.72
7.1.100.0030.00816.94
7.1.90.0000.01015.79
7.1.80.0060.00715.73
7.1.70.0040.00416.54
7.1.60.0070.01317.67
7.1.50.0050.01016.14
7.1.40.0050.00515.73
7.1.30.0070.01015.86
7.1.20.0070.00715.78
7.1.10.0000.00915.90
7.1.00.0080.03819.03
7.0.330.0030.00815.33
7.0.320.0000.00915.47
7.0.310.0030.00915.45
7.0.300.0040.00715.23
7.0.290.0030.00715.67
7.0.280.0090.00015.42
7.0.270.0100.00315.22
7.0.260.0130.00315.18
7.0.250.0080.00415.61
7.0.240.0060.00315.44
7.0.230.0110.00415.58
7.0.220.0110.00415.58
7.0.210.0040.00715.64
7.0.200.0040.00516.24
7.0.190.0030.01415.45
7.0.180.0040.01115.36
7.0.170.0040.00715.64
7.0.160.0070.00715.65
7.0.150.0030.00715.50
7.0.140.0050.03818.66
7.0.130.0080.00015.53
7.0.120.0070.00715.29
7.0.110.0030.01015.53
7.0.100.0040.00715.60
7.0.90.0000.01315.22
7.0.80.0000.01115.46
7.0.70.0030.01015.21
7.0.60.0040.03917.78
7.0.50.0020.02516.57
7.0.40.0090.02316.88
7.0.30.0180.02316.78
7.0.20.0230.04216.80
7.0.10.0090.03116.92
7.0.00.0030.03016.88
5.6.400.0140.00414.37
5.6.390.0090.00314.32
5.6.380.0140.00014.05
5.6.370.0070.00714.23
5.6.360.0030.00914.60
5.6.350.0120.00014.53
5.6.340.0060.00314.66
5.6.330.0090.00314.54
5.6.320.0030.01014.21
5.6.310.0030.01014.33
5.6.300.0070.01014.18
5.6.290.0030.01014.80
5.6.280.0040.03917.61
5.6.270.0030.01114.65
5.6.260.0060.00314.29
5.6.250.0030.00814.09
5.6.240.0070.00714.72
5.6.230.0070.00714.51
5.6.220.0030.00914.65
5.6.210.0160.03617.63
5.6.200.0060.02316.26
5.6.190.0020.02617.37
5.6.180.0090.02817.30
5.6.170.0170.03617.46
5.6.160.0070.05017.49
5.6.150.0080.02316.22
5.6.140.0050.04116.31
5.6.130.0050.03616.34
5.6.120.0020.02717.71
5.6.110.0100.04317.67
5.6.100.0070.02517.74
5.6.90.0100.04017.71
5.6.80.0070.04417.46
5.6.70.0080.00814.46
5.6.60.0070.00314.09
5.6.50.0000.00914.39
5.6.40.0090.00614.30
5.6.30.0060.00914.00
5.6.20.0100.00314.30
5.6.10.0060.00914.52
5.6.00.0060.00614.07
5.5.380.0030.00514.26
5.5.370.0040.01114.41
5.5.360.0080.00014.54
5.5.350.1310.02117.42
5.5.340.0100.01816.30
5.5.330.0050.03217.36
5.5.320.0180.03817.34
5.5.310.0120.04817.30
5.5.300.0100.02116.06
5.5.290.0050.03816.29
5.5.280.0050.04517.59
5.5.270.0120.04017.83
5.5.260.0060.03717.59
5.5.250.0050.04717.52
5.5.240.0080.02117.34
5.5.230.0080.00814.43
5.5.220.0040.00814.05
5.5.210.0090.00614.46
5.5.200.0070.00714.33
5.5.190.0110.00414.30
5.5.180.0000.00914.03
5.5.170.0040.01114.24
5.5.160.0070.01014.04
5.5.150.0090.00014.15
5.5.140.0060.00914.04
5.5.130.0060.00314.27
5.5.120.0060.00614.32
5.5.110.0000.01514.46
5.5.100.0040.00714.36
5.5.90.0100.00714.50
5.5.80.0070.01314.16
5.5.70.0060.00914.45
5.5.60.0030.00914.17
5.5.50.0060.01014.38
5.5.40.0040.01114.03
5.5.30.0110.00414.18
5.5.20.0030.01014.46
5.5.10.0070.00414.50
5.5.00.0000.00814.38
5.4.450.0350.03015.88
5.4.440.0180.02615.92
5.4.430.0180.03315.82
5.4.420.0140.02915.93
5.4.410.0100.03115.62
5.4.400.0400.02715.51
5.4.390.0380.03115.48
5.4.380.0450.02615.37
5.4.370.0480.02715.37
5.4.360.0480.02815.37
5.4.350.0420.03515.46
5.4.340.0450.03015.46
5.4.330.0000.00612.24
5.4.320.0470.03215.36
5.4.310.0470.03215.42
5.4.300.0520.02715.48
5.4.290.0490.02515.45
5.4.280.0480.02915.43
5.4.270.0480.02515.38
5.4.260.0440.02915.48
5.4.250.0470.03915.45
5.4.240.0490.03015.51
5.4.230.0440.03015.41
5.4.220.0480.03015.47
5.4.210.0470.03015.39
5.4.200.0480.02514.36
5.4.190.0520.02815.50
5.4.180.0450.03115.44
5.4.170.0430.03115.45
5.4.160.0480.02915.38
5.4.150.0450.03815.47
5.4.140.0530.03014.21
5.4.130.0490.02614.26
5.4.120.0530.02214.26
5.4.110.0500.02714.19
5.4.100.0440.03514.28
5.4.90.0570.02814.22
5.4.80.0550.02314.27
5.4.70.0500.02614.21
5.4.60.0400.03414.13
5.4.50.0480.02714.14
5.4.40.0460.02714.22
5.4.30.0480.02914.19
5.4.20.0520.02814.26
5.4.10.0600.03014.26
5.4.00.0460.03813.94
5.3.290.1000.08014.63
5.3.280.0900.05714.69
5.3.270.0870.06014.70
5.3.260.0800.05314.62
5.3.250.0900.05314.65
5.3.240.0870.05314.65
5.3.230.0900.05714.71
5.3.220.0900.05314.51
5.3.210.0830.06014.53
5.3.200.0900.04714.67
5.3.190.0900.05014.63
5.3.180.0870.05014.68
5.3.170.1030.03714.68
5.3.160.1000.04314.67
5.3.150.0730.05714.56
5.3.140.0870.05314.48
5.3.130.0730.06014.59
5.3.120.0870.05714.45
5.3.110.0900.05314.51
5.3.100.0900.06314.09
5.3.90.0900.05314.02
5.3.80.0870.05713.92
5.3.70.1000.04313.94
5.3.60.0800.05013.94
5.3.50.0800.05313.94
5.3.40.0970.05313.89
5.3.30.1170.05014.02
5.3.20.0930.06013.74
5.3.10.0870.05313.60
5.3.00.0900.05313.58
5.2.170.0700.04711.14
5.2.160.0830.04711.16
5.2.150.0770.04311.07
5.2.140.0830.03311.09
5.2.130.0700.04711.03
5.2.120.0800.03311.15
5.2.110.0700.04711.27
5.2.100.0770.03711.06
5.2.90.0730.04011.16
5.2.80.0730.04011.25
5.2.70.0770.03711.09
5.2.60.0770.04311.02
5.2.50.0770.04011.01
5.2.40.0570.04010.97
5.2.30.0630.04010.99
5.2.20.0630.03711.08
5.2.10.0600.04010.91
5.2.00.0600.04310.86
5.1.60.0600.03710.14
5.1.50.0700.03310.03
5.1.40.0630.03310.19
5.1.30.0570.04010.34
5.1.20.0600.03710.36
5.1.10.0530.04010.11
5.1.00.0470.04710.14
5.0.50.0330.0308.68
5.0.40.0300.0278.56
5.0.30.0270.0478.34
5.0.20.0300.0308.32
5.0.10.0270.0338.19
5.0.00.0400.0408.20
4.4.90.0370.0235.91
4.4.80.0270.0236.01
4.4.70.0330.0205.84
4.4.60.0330.0235.91
4.4.50.0300.0235.93
4.4.40.0270.0375.93
4.4.30.0300.0235.90
4.4.20.0300.0205.98
4.4.10.0330.0205.95
4.4.00.0330.0306.04
4.3.110.0370.0235.81
4.3.100.0270.0235.94
4.3.90.0330.0175.80
4.3.80.0330.0305.87
4.3.70.0370.0275.89
4.3.60.0400.0205.88
4.3.50.0270.0235.82
4.3.40.0270.0375.75
4.3.30.0170.0204.65
4.3.20.0200.0234.59
4.3.10.0130.0234.56
4.3.00.0070.0277.02

preferences:
53.7 ms | 401 KiB | 5 Q