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); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 59
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 29
Branch analysis from position: 28
2 jumps found. (Code = 46) Position 1 = 31, Position 2 = 36
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 59
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 57
Branch analysis from position: 57
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 39
Branch analysis from position: 59
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 53
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 39
Branch analysis from position: 59
Branch analysis from position: 39
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 39
Branch analysis from position: 59
Branch analysis from position: 39
Branch analysis from position: 59
Branch analysis from position: 36
Branch analysis from position: 29
Branch analysis from position: 22
Branch analysis from position: 59
filename:       /in/ULlrA
function name:  (null)
number of ops:  63
compiled vars:  !0 = $currentpageid, !1 = $nmstart, !2 = $nrtotal, !3 = $nrposts, !4 = $pages, !5 = $ssPagingStartCount, !6 = $ssPagingCurrentCount, !7 = $ssPagingEndCount, !8 = $totalpages, !9 = $ssPagingCurrentCountFrom, !10 = $ssPagingCurrentCountTo, !11 = $x, !12 = $inc, !13 = $display
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                           ~14     !1, 2
          1        ASSIGN                                                   !0, ~14
   22     2        ASSIGN                                                   !2, 23
   23     3        ASSIGN                                                   !3, 1
   24     4        ASSIGN                                                   !4, ''
   26     5        ASSIGN                                                   !5, 2
   27     6        ASSIGN                                                   !6, 3
   28     7        ASSIGN                                                   !7, 2
   30     8        INIT_FCALL                                               'ceil'
          9        DIV                                              ~22     !2, !3
         10        SEND_VAL                                                 ~22
         11        DO_ICALL                                         $23     
         12        ASSIGN                                                   !8, $23
   31    13        IS_SMALLER                                               1, !8
         14      > JMPZ                                                     ~25, ->59
   46    15    >   DIV                                              ~26     !6, 2
         16        CAST                                          4  ~27     ~26
         17        SUB                                              ~28     !0, ~27
         18        ASSIGN                                                   !9, ~28
   47    19        IS_SMALLER                                               !9, 0
         20      > JMPZ                                                     ~30, ->22
         21    >   ASSIGN                                                   !9, 0
   49    22    >   DIV                                              ~32     !6, 2
         23        CAST                                          4  ~33     ~32
         24        ADD                                              ~34     !0, ~33
         25        ASSIGN                                                   !10, ~34
   50    26        IS_SMALLER                                               !8, !10
         27      > JMPZ                                                     ~36, ->29
         28    >   ASSIGN                                                   !10, !8
   52    29    >   IS_SMALLER_OR_EQUAL                              ~38     0, !0
         30      > JMPZ_EX                                          ~38     ~38, ->36
         31    >   DIV                                              ~39     !6, 2
         32        CAST                                          4  ~40     ~39
         33        ADD                                              ~41     !5, ~40
         34        IS_SMALLER                                       ~42     !0, ~41
         35        BOOL                                             ~38     ~42
         36    > > JMPZ                                                     ~38, ->59
   53    37    >   ASSIGN                                                   !11, !9
         38      > JMP                                                      ->57
   54    39    >   MUL                                              ~44     !11, !3
         40        ASSIGN                                                   !12, ~44
   55    41        ADD                                              ~46     !11, 1
         42        ASSIGN                                                   !13, ~46
   56    43        IS_NOT_EQUAL                                             !12, !1
         44      > JMPZ                                                     ~48, ->53
   57    45    >   ROPE_INIT                                     3  ~50     'nmstart%3D'
         46        ROPE_ADD                                      1  ~50     ~50, !12
         47        ROPE_END                                      2  ~49     ~50, '%27%3E'
         48        CONCAT                                           ~52     '%0A%3Ca+class%3D%22nl_page%22+href%3D%27', ~49
         49        CONCAT                                           ~53     ~52, !13
         50        CONCAT                                           ~54     ~53, '%3C%2Fa%3E'
         51        ASSIGN_OP                                     8          !4, ~54
         52      > JMP                                                      ->56
   59    53    >   CONCAT                                           ~56     '%0A%3Cspan+class%3D%22nl_page+nl_page__currentpage%22%3E', !13
         54        CONCAT                                           ~57     ~56, '%3C%2Fspan%3E'
         55        ASSIGN_OP                                     8          !4, ~57
   53    56    >   PRE_INC                                                  !11
         57    >   IS_SMALLER                                               !11, !10
         58      > JMPNZ                                                    ~60, ->39
   65    59    >   INIT_FCALL                                               'var_dump'
         60        SEND_VAR                                                 !4
         61        DO_ICALL                                                 
   66    62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.08 ms | 1400 KiB | 17 Q