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 > */ $currentpageid = $nmstart = 2; $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'>".$display."</a>"; } else { $pages .= "\n<span class=\"nl_page nl_page__currentpage\">".$display."</span>"; } } */ if ( ($currentpageid >= 0) && ($currentpageid < $ssPagingStartCount) ) { //$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; 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 = 56
Branch analysis from position: 15
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 56
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 34
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
2 jumps found. (Code = 44) Position 1 = 56, Position 2 = 36
Branch analysis from position: 56
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 50
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 56, Position 2 = 36
Branch analysis from position: 56
Branch analysis from position: 36
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 56, Position 2 = 36
Branch analysis from position: 56
Branch analysis from position: 36
Branch analysis from position: 34
Branch analysis from position: 27
Branch analysis from position: 56
Branch analysis from position: 19
Branch analysis from position: 56
filename:       /in/EvIPA
function name:  (null)
number of ops:  60
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
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                           ~14     !1, 2
          1        ASSIGN                                                   !0, ~14
   18     2        ASSIGN                                                   !2, 23
   19     3        ASSIGN                                                   !3, 1
   20     4        ASSIGN                                                   !4, ''
   22     5        ASSIGN                                                   !5, 3
   23     6        ASSIGN                                                   !6, 3
   24     7        ASSIGN                                                   !7, 2
   26     8        INIT_FCALL                                               'ceil'
          9        DIV                                              ~22     !2, !3
         10        SEND_VAL                                                 ~22
         11        DO_ICALL                                         $23     
         12        ASSIGN                                                   !8, $23
   27    13        IS_SMALLER                                               1, !8
         14      > JMPZ                                                     ~25, ->56
   39    15    >   IS_SMALLER_OR_EQUAL                              ~26     0, !0
         16      > JMPZ_EX                                          ~26     ~26, ->19
         17    >   IS_SMALLER                                       ~27     !0, !5
         18        BOOL                                             ~26     ~27
         19    > > JMPZ                                                     ~26, ->56
   42    20    >   DIV                                              ~28     !6, 2
         21        CAST                                          4  ~29     ~28
         22        SUB                                              ~30     !0, ~29
         23        ASSIGN                                                   !9, ~30
   43    24        IS_SMALLER                                               !9, 0
         25      > JMPZ                                                     ~32, ->27
         26    >   ASSIGN                                                   !9, 0
   45    27    >   DIV                                              ~34     !6, 2
         28        CAST                                          4  ~35     ~34
         29        ADD                                              ~36     !0, ~35
         30        ASSIGN                                                   !10, ~36
   46    31        IS_SMALLER                                               !8, !10
         32      > JMPZ                                                     ~38, ->34
         33    >   ASSIGN                                                   !10, !8
   48    34    >   ASSIGN                                                   !11, !9
         35      > JMP                                                      ->54
   49    36    >   MUL                                              ~41     !11, !3
         37        ASSIGN                                                   !12, ~41
   50    38        ADD                                              ~43     !11, 1
         39        ASSIGN                                                   !13, ~43
   51    40        IS_NOT_EQUAL                                             !12, !1
         41      > JMPZ                                                     ~45, ->50
   52    42    >   ROPE_INIT                                     3  ~47     'nmstart%3D'
         43        ROPE_ADD                                      1  ~47     ~47, !12
         44        ROPE_END                                      2  ~46     ~47, '%27%3E'
         45        CONCAT                                           ~49     '%0A%3Ca+class%3D%22nl_page%22+href%3D%27', ~46
         46        CONCAT                                           ~50     ~49, !13
         47        CONCAT                                           ~51     ~50, '%3C%2Fa%3E'
         48        ASSIGN_OP                                     8          !4, ~51
         49      > JMP                                                      ->53
   54    50    >   CONCAT                                           ~53     '%0A%3Cspan+class%3D%22nl_page+nl_page__currentpage%22%3E', !13
         51        CONCAT                                           ~54     ~53, '%3C%2Fspan%3E'
         52        ASSIGN_OP                                     8          !4, ~54
   48    53    >   PRE_INC                                                  !11
         54    >   IS_SMALLER                                               !11, !10
         55      > JMPNZ                                                    ~57, ->36
   60    56    >   INIT_FCALL                                               'var_dump'
         57        SEND_VAR                                                 !4
         58        DO_ICALL                                                 
   61    59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.23 ms | 1400 KiB | 17 Q