3v4l.org

run code in 300+ PHP versions simultaneously
<div class="sidebar" id=""> <a href="<?php echo get_settings('home'); ?>"><img src="<?php bloginfo('template_directory'); ?>/_/img/logo.svg"></a> <nav> <!-- <ul><?php $args = array( 'orderby' => 'none', 'order' => 'ASC', 'hide_empty' => 0, 'use_desc_for_title' => 0, 'hierarchical' => 1, 'title_li' => '', 'taxonomy' => 'project_category', ); wp_list_categories($args); ?> </ul> --> <?php //$current_term = get_query_var( 'term' ); echo $term; ?> <ul class="projectmenu"> <?php $custom_terms = get_terms('project_category', 'hide_empty=0'); $c = '0'; foreach($custom_terms as $custom_term) { wp_reset_query(); $args = array('post_type' => 'project', 'tax_query' => array( array( 'taxonomy' => 'project_category', 'field' => 'slug', 'terms' => $custom_term->slug, ), ), ); $loop = new WP_Query($args); if($loop->have_posts()) { $c++; /* ?> <li><label for="<?php echo 'menu_'.$c.'';?>"><span><?php echo''.$custom_term->name.''; ?></span></label> <input type="radio" name="category" id="<?php echo 'menu_'.$c.'';?>" value="your value" <?php if(isset($_POST['category'])) echo "checked='checked'"; ?> /> <?php */ echo ' <li><label for="menu_'.$c.'"><span>'.$custom_term->name.'</span></label> <input type="radio" name="category" id="menu_'.$c.'" /> '; ?> <ul class="submenu"> <?php while($loop->have_posts()) : $loop->the_post(); echo '<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>'; endwhile; ?> </ul> <?php } } // endif // } //endif ?> </li> </ul> <!-- <ul> <li><a href="#">Fotografie</a></li> <ul class="submenu"> <li><a href="#">long time no see</a></li> <li><a href="#">on the rocks</a></li> <li><a href="#">quite simple</a></li> <li><a href="#">perfect day</a></li> </ul> </ul> --> <?php wp_nav_menu(array('menu' => 'Hauptnavigation'));?> </nav> </div>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 68
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 68
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 67
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 63
Branch analysis from position: 63
2 jumps found. (Code = 44) Position 1 = 66, Position 2 = 52
Branch analysis from position: 66
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 66, Position 2 = 52
Branch analysis from position: 66
Branch analysis from position: 52
Branch analysis from position: 67
Branch analysis from position: 68
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
filename:       /in/FNjkG
function name:  (null)
number of ops:  75
compiled vars:  !0 = $args, !1 = $custom_terms, !2 = $c, !3 = $custom_term, !4 = $loop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Cdiv+class%3D%22sidebar%22+id%3D%22%22%3E%0A++++++++%3Ca+href%3D%22'
    2     1        INIT_FCALL_BY_NAME                                       'get_settings'
          2        SEND_VAL_EX                                              'home'
          3        DO_FCALL                                      0  $5      
          4        ECHO                                                     $5
          5        ECHO                                                     '%22%3E%3Cimg+src%3D%22'
          6        INIT_FCALL_BY_NAME                                       'bloginfo'
          7        SEND_VAL_EX                                              'template_directory'
          8        DO_FCALL                                      0          
          9        ECHO                                                     '%2F_%2Fimg%2Flogo.svg%22%3E%3C%2Fa%3E%0A++++++++%3Cnav%3E%0A++++++++++++%3C%21--%0A++++++++++++%3Cul%3E'
    6    10        ASSIGN                                                   !0, <array>
   15    11        INIT_FCALL_BY_NAME                                       'wp_list_categories'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0          
   16    14        ECHO                                                     '++++++++++++%3C%2Ful%3E%0A++++++++--%3E%0A++++++++++++++++'
   22    15        ECHO                                                     '++++++++++++++++%3Cul+class%3D%22projectmenu%22%3E+%0A++++++++++++++++'
   25    16        INIT_FCALL_BY_NAME                                       'get_terms'
         17        SEND_VAL_EX                                              'project_category'
         18        SEND_VAL_EX                                              'hide_empty%3D0'
         19        DO_FCALL                                      0  $9      
         20        ASSIGN                                                   !1, $9
   26    21        ASSIGN                                                   !2, '0'
   27    22      > FE_RESET_R                                       $12     !1, ->68
         23    > > FE_FETCH_R                                               $12, !3, ->68
   28    24    >   INIT_FCALL_BY_NAME                                       'wp_reset_query'
         25        DO_FCALL                                      0          
   29    26        INIT_ARRAY                                       ~14     'project', 'post_type'
   32    27        INIT_ARRAY                                       ~15     'project_category', 'taxonomy'
   33    28        ADD_ARRAY_ELEMENT                                ~15     'slug', 'field'
   34    29        FETCH_OBJ_R                                      ~16     !3, 'slug'
         30        ADD_ARRAY_ELEMENT                                ~15     ~16, 'terms'
         31        INIT_ARRAY                                       ~17     ~15
         32        ADD_ARRAY_ELEMENT                                ~14     ~17, 'tax_query'
   29    33        ASSIGN                                                   !0, ~14
   39    34        NEW                                              $19     'WP_Query'
         35        SEND_VAR_EX                                              !0
         36        DO_FCALL                                      0          
         37        ASSIGN                                                   !4, $19
   40    38        INIT_METHOD_CALL                                         !4, 'have_posts'
         39        DO_FCALL                                      0  $22     
         40      > JMPZ                                                     $22, ->67
   42    41    >   PRE_INC                                                  !2
   54    42        CONCAT                                           ~24     '%0A++++++++++++++++++++++++++++%3Cli%3E%3Clabel+for%3D%22menu_', !2
         43        CONCAT                                           ~25     ~24, '%22%3E%3Cspan%3E'
         44        FETCH_OBJ_R                                      ~26     !3, 'name'
         45        CONCAT                                           ~27     ~25, ~26
         46        CONCAT                                           ~28     ~27, '%3C%2Fspan%3E%3C%2Flabel%3E%0A++++++++++++++++++++++++++++%3Cinput+type%3D%22radio%22+name%3D%22category%22+id%3D%22menu_'
   55    47        CONCAT                                           ~29     ~28, !2
         48        CONCAT                                           ~30     ~29, '%22+%2F%3E%0A++++++++++++++++++++++++++++'
         49        ECHO                                                     ~30
   61    50        ECHO                                                     '++++++++++++++++++++++++++++%3Cul+class%3D%22submenu%22%3E%0A++++++++++++++++++++++++++++'
   64    51      > JMP                                                      ->63
         52    >   INIT_METHOD_CALL                                         !4, 'the_post'
         53        DO_FCALL                                      0          
   65    54        INIT_FCALL_BY_NAME                                       'get_permalink'
         55        DO_FCALL                                      0  $32     
         56        CONCAT                                           ~33     '%3Cli%3E%3Ca+href%3D%22', $32
         57        CONCAT                                           ~34     ~33, '%22%3E'
         58        INIT_FCALL_BY_NAME                                       'get_the_title'
         59        DO_FCALL                                      0  $35     
         60        CONCAT                                           ~36     ~34, $35
         61        CONCAT                                           ~37     ~36, '%3C%2Fa%3E%3C%2Fli%3E'
         62        ECHO                                                     ~37
   64    63    >   INIT_METHOD_CALL                                         !4, 'have_posts'
         64        DO_FCALL                                      0  $38     
         65      > JMPNZ                                                    $38, ->52
   69    66    >   ECHO                                                     '%0A++++++++++++++++++++++++++++%3C%2Ful%3E%0A++++++++++++++++++++++++++++'
   27    67    > > JMP                                                      ->23
         68    >   FE_FREE                                                  $12
   76    69        ECHO                                                     '++++++++++++++++++++%3C%2Fli%3E%0A++++++++++++++++%3C%2Ful%3E%0A+++++++++++++%3C%21--%0A++++++++++++++++%3Cul%3E%0A++++++++++++++++++++%3Cli%3E%3Ca+href%3D%22%23%22%3EFotografie%3C%2Fa%3E%3C%2Fli%3E%0A++++++++++++++++++++++++%3Cul+class%3D%22submenu%22%3E%0A++++++++++++++++++++++++++++%3Cli%3E%3Ca+href%3D%22%23%22%3Elong+time+no+see%3C%2Fa%3E%3C%2Fli%3E%0A++++++++++++++++++++++++++++%3Cli%3E%3Ca+href%3D%22%23%22%3Eon+the+rocks%3C%2Fa%3E%3C%2Fli%3E%0A++++++++++++++++++++++++++++%3Cli%3E%3Ca+href%3D%22%23%22%3Equite+simple%3C%2Fa%3E%3C%2Fli%3E%0A++++++++++++++++++++++++++++%3Cli%3E%3Ca+href%3D%22%23%22%3Eperfect+day%3C%2Fa%3E%3C%2Fli%3E%0A++++++++++++++++++++++++%3C%2Ful%3E%0A++++++++++++++++%3C%2Ful%3E%0A++++++++++++--%3E%0A%0A++++++++++++++++'
   90    70        INIT_FCALL_BY_NAME                                       'wp_nav_menu'
         71        SEND_VAL_EX                                              <array>
         72        DO_FCALL                                      0          
   91    73        ECHO                                                     '++++++++++++%3C%2Fnav%3E%0A++++++%3C%2Fdiv%3E'
   92    74      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.23 ms | 1403 KiB | 13 Q