3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* < [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 = 22; $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'>&nbsp;".$display."&nbsp;</a>"; } else { $pages .= "\n<span class=\"nl_page nl_page__currentpage\">&nbsp;".$display."&nbsp;</span>"; } } } var_dump($pages); ?>
Output for git.master, git.master_jit, rfc.property-hooks
string(1278) " <a class="nl_page" href='nmstart=0'>&nbsp;1&nbsp;</a> <a class="nl_page" href='nmstart=1'>&nbsp;2&nbsp;</a> <a class="nl_page" href='nmstart=2'>&nbsp;3&nbsp;</a> <a class="nl_page" href='nmstart=3'>&nbsp;4&nbsp;</a> <a class="nl_page" href='nmstart=4'>&nbsp;5&nbsp;</a> <a class="nl_page" href='nmstart=5'>&nbsp;6&nbsp;</a> <a class="nl_page" href='nmstart=6'>&nbsp;7&nbsp;</a> <a class="nl_page" href='nmstart=7'>&nbsp;8&nbsp;</a> <a class="nl_page" href='nmstart=8'>&nbsp;9&nbsp;</a> <a class="nl_page" href='nmstart=9'>&nbsp;10&nbsp;</a> <a class="nl_page" href='nmstart=10'>&nbsp;11&nbsp;</a> <a class="nl_page" href='nmstart=11'>&nbsp;12&nbsp;</a> <a class="nl_page" href='nmstart=12'>&nbsp;13&nbsp;</a> <a class="nl_page" href='nmstart=13'>&nbsp;14&nbsp;</a> <a class="nl_page" href='nmstart=14'>&nbsp;15&nbsp;</a> <a class="nl_page" href='nmstart=15'>&nbsp;16&nbsp;</a> <a class="nl_page" href='nmstart=16'>&nbsp;17&nbsp;</a> <a class="nl_page" href='nmstart=17'>&nbsp;18&nbsp;</a> <a class="nl_page" href='nmstart=18'>&nbsp;19&nbsp;</a> <a class="nl_page" href='nmstart=19'>&nbsp;20&nbsp;</a> <a class="nl_page" href='nmstart=20'>&nbsp;21&nbsp;</a> <a class="nl_page" href='nmstart=21'>&nbsp;22&nbsp;</a> <span class="nl_page nl_page__currentpage">&nbsp;23&nbsp;</span>"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
50.52 ms | 404 KiB | 8 Q