3v4l.org

run code in 300+ PHP versions simultaneously
<?php $selectors = array( "title", "title_bg", "title_color", "title_text_align", "lead", "lead_bg", "lead_color", "lead_text_align", "button_file_link", "button_file_link_text", "button_file_link_size", "button_file_link_style", "button_file_link_color", "button_file_link_bg", "button_page_link", "button_page_link_text", "button_page_link_size", "button_page_link_style", "button_page_link_color", "button_page_link_bg", "button_href_link", "button_href_link_text", "button_href_link_size", "button_href_link_style", "button_href_link_color", "button_href_link_bg", "icon", "icon_bg", "icon_color", "icon_text_align", "icon_link_type", "icon_file_link", "icon_page_link", "icon_href_link", "image", "image_thumb", "image_tmpimg", "image_extsrc", "image_quality", "image_alt", "image_align", "image_link_type", "image_file_link", "image_page_link", "image_href_link", "advanced_styles", "button_align", ); $roots = []; $count = $last = 0; foreach ($selectors as $selector) { $root = $selector; while ($pos = (strpos($selector, '_') !== false)) { $root = substr($avatarimg, 0, $pos); foreach ($selectors as $test) { if (strpos($test, $root) !== false) { $count++; } } $last = $count; $count = 0; if ($count > $last) { $last = $count; $count = 0; } elseif ($count === $last) { break; } } $roots[] = $root; } echo '<pre>'.print_r($roots, true).'</pre>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 45
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 45
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 8
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 24
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 23
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 35
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
Branch analysis from position: 35
Branch analysis from position: 24
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
filename:       /in/AmcJQ
function name:  (null)
number of ops:  54
compiled vars:  !0 = $selectors, !1 = $roots, !2 = $count, !3 = $last, !4 = $selector, !5 = $root, !6 = $avatarimg, !7 = $pos, !8 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   54     1        ASSIGN                                                   !1, <array>
   55     2        ASSIGN                                           ~11     !3, 0
          3        ASSIGN                                                   !2, ~11
   57     4      > FE_RESET_R                                       $13     !0, ->45
          5    > > FE_FETCH_R                                               $13, !4, ->45
   59     6    >   ASSIGN                                                   !5, !4
   61     7      > JMP                                                      ->35
   64     8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !6
         10        SEND_VAL                                                 0
         11        SEND_VAR                                                 !7
         12        DO_ICALL                                         $15     
         13        ASSIGN                                                   !5, $15
   66    14      > FE_RESET_R                                       $17     !0, ->24
         15    > > FE_FETCH_R                                               $17, !8, ->24
   68    16    >   INIT_FCALL                                               'strpos'
         17        SEND_VAR                                                 !8
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                         $18     
         20        TYPE_CHECK                                  1018          $18
         21      > JMPZ                                                     ~19, ->23
   70    22    >   PRE_INC                                                  !2
   66    23    > > JMP                                                      ->15
         24    >   FE_FREE                                                  $17
   74    25        ASSIGN                                                   !3, !2
   75    26        ASSIGN                                                   !2, 0
   77    27        IS_SMALLER                                               !3, !2
         28      > JMPZ                                                     ~23, ->32
   79    29    >   ASSIGN                                                   !3, !2
   80    30        ASSIGN                                                   !2, 0
         31      > JMP                                                      ->35
   82    32    >   IS_IDENTICAL                                             !2, !3
         33      > JMPZ                                                     ~26, ->35
   84    34    > > JMP                                                      ->42
   61    35    >   INIT_FCALL                                               'strpos'
         36        SEND_VAR                                                 !4
         37        SEND_VAL                                                 '_'
         38        DO_ICALL                                         $27     
         39        TYPE_CHECK                                  1018  ~28     $27
         40        ASSIGN                                           ~29     !7, ~28
         41      > JMPNZ                                                    ~29, ->8
   88    42    >   ASSIGN_DIM                                               !1
         43        OP_DATA                                                  !5
   57    44      > JMP                                                      ->5
         45    >   FE_FREE                                                  $13
   91    46        INIT_FCALL                                               'print_r'
         47        SEND_VAR                                                 !1
         48        SEND_VAL                                                 <true>
         49        DO_ICALL                                         $31     
         50        CONCAT                                           ~32     '%3Cpre%3E', $31
         51        CONCAT                                           ~33     ~32, '%3C%2Fpre%3E'
         52        ECHO                                                     ~33
         53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.18 ms | 1400 KiB | 19 Q