3v4l.org

run code in 300+ PHP versions simultaneously
<div id="right2"> <?php if($post->ID==13) { $galleries = $wpdb->get_results('SELECT * FROM wp_ngg_gallery WHERE gid > 1 ORDER BY name;', OBJECT); echo "<a href=/?page_id=13>Gallery</a><br />"; echo "<ul>"; foreach ($galleries as $row) { echo "<li><a href=/?page_id=13&amp;album=1&amp;gallery=".$row->gid.">".$row->title."</a></li>"; } echo "</ul>"; } else { if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { $galleries = $wpdb->get_results('SELECT p1.post_title, p1.post_parent, p2.post_title as parent_title FROM wp_posts as p1 LEFT OUTER JOIN wp_posts as p2 ON (p1.post_parent=p2.id) WHERE p1.id = '.$post->ID.';', OBJECT); foreach ($galleries as $row) { if ($row->post_parent > 0) echo "<a href=/?page_id=".$row->post_parent.">".$row->parent_title."</a>"; else echo "<a href=/?page_id=".$post->ID.">".$row->post_title."</a>"; } echo "<ul>"; echo $children; echo "</ul>"; } } ?> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : ?> <?php endif; ?> </div> <!-- end right 2 -->
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 25
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
2 jumps found. (Code = 47) Position 1 = 83, Position 2 = 88
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 89, Position 2 = 90
Branch analysis from position: 89
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 90
Branch analysis from position: 88
Branch analysis from position: 22
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 35
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 77
Branch analysis from position: 43
2 jumps found. (Code = 77) Position 1 = 53, Position 2 = 73
Branch analysis from position: 53
2 jumps found. (Code = 78) Position 1 = 54, Position 2 = 73
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 65
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
Branch analysis from position: 65
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
Branch analysis from position: 73
2 jumps found. (Code = 47) Position 1 = 83, Position 2 = 88
Branch analysis from position: 83
Branch analysis from position: 88
Branch analysis from position: 73
Branch analysis from position: 77
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 77
Branch analysis from position: 43
Branch analysis from position: 77
filename:       /in/t0RtB
function name:  (null)
number of ops:  92
compiled vars:  !0 = $post, !1 = $galleries, !2 = $wpdb, !3 = $row, !4 = $children
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Cdiv+id%3D%22right2%22%3E%0A%0A'
    4     1        FETCH_OBJ_R                                      ~5      !0, 'ID'
          2        IS_EQUAL                                                 ~5, 13
          3      > JMPZ                                                     ~6, ->25
    7     4    >   INIT_METHOD_CALL                                         !2, 'get_results'
          5        SEND_VAL_EX                                              'SELECT+%2A+FROM+wp_ngg_gallery+WHERE+gid+%3E+1+ORDER+BY+name%3B'
          6        FETCH_CONSTANT                                   ~7      'OBJECT'
          7        SEND_VAL_EX                                              ~7
          8        DO_FCALL                                      0  $8      
          9        ASSIGN                                                   !1, $8
    9    10        ECHO                                                     '%3Ca+href%3D%2F%3Fpage_id%3D13%3EGallery%3C%2Fa%3E%3Cbr+%2F%3E'
   10    11        ECHO                                                     '%3Cul%3E'
   12    12      > FE_RESET_R                                       $10     !1, ->22
         13    > > FE_FETCH_R                                               $10, !3, ->22
   14    14    >   FETCH_OBJ_R                                      ~11     !3, 'gid'
         15        CONCAT                                           ~12     '%3Cli%3E%3Ca+href%3D%2F%3Fpage_id%3D13%26amp%3Balbum%3D1%26amp%3Bgallery%3D', ~11
         16        CONCAT                                           ~13     ~12, '%3E'
         17        FETCH_OBJ_R                                      ~14     !3, 'title'
         18        CONCAT                                           ~15     ~13, ~14
         19        CONCAT                                           ~16     ~15, '%3C%2Fa%3E%3C%2Fli%3E'
         20        ECHO                                                     ~16
   12    21      > JMP                                                      ->13
         22    >   FE_FREE                                                  $10
   17    23        ECHO                                                     '%3C%2Ful%3E'
         24      > JMP                                                      ->77
   22    25    >   FETCH_OBJ_R                                      ~17     !0, 'post_parent'
         26      > JMPZ                                                     ~17, ->35
   23    27    >   INIT_FCALL_BY_NAME                                       'wp_list_pages'
         28        FETCH_OBJ_R                                      ~18     !0, 'post_parent'
         29        CONCAT                                           ~19     'title_li%3D%26child_of%3D', ~18
         30        CONCAT                                           ~20     ~19, '%26echo%3D0'
         31        SEND_VAL_EX                                              ~20
         32        DO_FCALL                                      0  $21     
         33        ASSIGN                                                   !4, $21
         34      > JMP                                                      ->42
   25    35    >   INIT_FCALL_BY_NAME                                       'wp_list_pages'
         36        FETCH_OBJ_R                                      ~23     !0, 'ID'
         37        CONCAT                                           ~24     'title_li%3D%26child_of%3D', ~23
         38        CONCAT                                           ~25     ~24, '%26echo%3D0'
         39        SEND_VAL_EX                                              ~25
         40        DO_FCALL                                      0  $26     
         41        ASSIGN                                                   !4, $26
   27    42    > > JMPZ                                                     !4, ->77
   29    43    >   INIT_METHOD_CALL                                         !2, 'get_results'
         44        FETCH_OBJ_R                                      ~28     !0, 'ID'
         45        CONCAT                                           ~29     'SELECT+p1.post_title%2C+p1.post_parent%2C+p2.post_title+as+parent_title+FROM+wp_posts+as+p1+LEFT+OUTER+JOIN+wp_posts+as+p2+ON+%28p1.post_parent%3Dp2.id%29+WHERE+p1.id+%3D+', ~28
         46        CONCAT                                           ~30     ~29, '%3B'
         47        SEND_VAL_EX                                              ~30
         48        FETCH_CONSTANT                                   ~31     'OBJECT'
         49        SEND_VAL_EX                                              ~31
         50        DO_FCALL                                      0  $32     
         51        ASSIGN                                                   !1, $32
   31    52      > FE_RESET_R                                       $34     !1, ->73
         53    > > FE_FETCH_R                                               $34, !3, ->73
   33    54    >   FETCH_OBJ_R                                      ~35     !3, 'post_parent'
         55        IS_SMALLER                                               0, ~35
         56      > JMPZ                                                     ~36, ->65
   34    57    >   FETCH_OBJ_R                                      ~37     !3, 'post_parent'
         58        CONCAT                                           ~38     '%3Ca+href%3D%2F%3Fpage_id%3D', ~37
         59        CONCAT                                           ~39     ~38, '%3E'
         60        FETCH_OBJ_R                                      ~40     !3, 'parent_title'
         61        CONCAT                                           ~41     ~39, ~40
         62        CONCAT                                           ~42     ~41, '%3C%2Fa%3E'
         63        ECHO                                                     ~42
         64      > JMP                                                      ->72
   36    65    >   FETCH_OBJ_R                                      ~43     !0, 'ID'
         66        CONCAT                                           ~44     '%3Ca+href%3D%2F%3Fpage_id%3D', ~43
         67        CONCAT                                           ~45     ~44, '%3E'
         68        FETCH_OBJ_R                                      ~46     !3, 'post_title'
         69        CONCAT                                           ~47     ~45, ~46
         70        CONCAT                                           ~48     ~47, '%3C%2Fa%3E'
         71        ECHO                                                     ~48
   31    72    > > JMP                                                      ->53
         73    >   FE_FREE                                                  $34
   39    74        ECHO                                                     '%3Cul%3E'
   40    75        ECHO                                                     !4
   41    76        ECHO                                                     '%3C%2Ful%3E'
   46    77    >   ECHO                                                     '%0A%0A'
   48    78        INIT_FCALL                                               'function_exists'
         79        SEND_VAL                                                 'dynamic_sidebar'
         80        DO_ICALL                                         $49     
         81        BOOL_NOT                                         ~50     $49
         82      > JMPNZ_EX                                         ~50     ~50, ->88
   49    83    >   INIT_FCALL_BY_NAME                                       'dynamic_sidebar'
         84        SEND_VAL_EX                                              3
         85        DO_FCALL                                      0  $51     
         86        BOOL_NOT                                         ~52     $51
         87        BOOL                                             ~50     ~52
         88    > > JMPZ                                                     ~50, ->90
   50    89    >   ECHO                                                     '++++++++%0A'
   52    90    >   ECHO                                                     '%0A%0A%3C%2Fdiv%3E+%3C%21--+end+right+2+--%3E'
   54    91      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.35 ms | 1404 KiB | 15 Q