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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.07 ms | 1409 KiB | 17 Q