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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.46 ms | 1404 KiB | 17 Q