3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP /* LookingGlass dgs-bootstraphtml.php */ define('dgs_void_tags', '<area><base><br><col><command><embed><hr><img><input><link><meta><param><source>'); define('dgs_CG_OPEN', '<div class="control-group">'); define('dgs_CG_CLOSE', '</div>'); define('dgs_HELP_OPEN', '<p class="help-block">'); define('dgs_HELP_CLOSE', '</p>'); $dgs_regNames = array(); function dgs_isVoidTag( $tagName ) { return (stripos(dgs_void_tags,'<'.$element.'>')!==false); } function dgs_nextRegNameID( $regName ) { global $dgs_regNames; if(isset($dgs_regNames[$regName])) { $dgs_regNames[$regName]++; } else { $dgs_regNames[$regName] = 0; } return $regName.$dgs_regNames[$regName]; } function dgs_attributes($OPTIONS) { $out = ''; foreach($OPTIONS as $parm => $val) { if(($parm[0]!='_')&&(!empty($val))) $out .= ' '.$parm.'="'.$val.'"'; } return $out; } function dgs_element($type, $text, $OPTIONS=array(), $print=true) { // create an element // $OPTIONS = array of option settings {including but not limited to:} // '_style' => {blank} | primary | success | info | warning | danger | inverse | link (string) // '_size' => large | {blank} | small | mini (string) // '_disabled' => true | false (boolean) // '_element' => a | button | input (string) // 'href' => {target URL} | # // 'type' => {blank} | button | input | submit // 'name' => {element name} // 'id' => {element id} // 'value' => {element value} $o = $OPTIONS; if(!isset($o['_element'])) return false; $element = strtolower($o['_element']); $class = (($type!='icon')?$type:''); $class .= ((!empty($o['_style']))?" $type-".$o['_style']:''); $class .= ((!empty($o['_size']))?" $type-".$o['_size']:''); $class .= (((!empty($o['_disabled']))&&($o['_disabled']==true))?' disabled':''); $class .= (((!empty($o['_inline']))&&($o['_inline']==true))?' inline':''); $class .= ((isset($o['class']))?' '.$o['class']:''); $class = trim($class); $o['class'] = $class; if($o['_disabled']==true)$o['disabled']='disabled'; $attr = dgs_attributes($o); $out = vsprintf('<%1$s %2$s>%3$s'.((!dgs_isVoidTag($element))?'</%1$s>':''), array( $element, $attr, $text, )); if(!empty($o['_help'])) $out.=dgs_HELP_OPEN.$o['_help'].dgs_HELP_CLOSE; if ($print==true) { echo $out; return true; } else { return $out; } } function dgs_button($text, $OPTIONS=array(), $print=true) { // create a button // $OPTIONS = array of option settings {including but not limited to:} // '_style' => {blank} | primary | info | success | warning | danger | inverse | link // '_size' => large | {blank} | small | mini $o = array( '_element' => 'button', 'type' => (empty($OPTIONS['type'])?'button':$OPTIONS['type']), ); return dgs_element('btn', $text, array_merge($OPTIONS, $o), $print); } function dgs_buttonA($text, $OPTIONS=array(), $print=true) { // create a button // $OPTIONS = array of option settings {including but not limited to:} // '_style' => {blank} | primary | info | success | warning | danger | inverse | link // '_size' => large | {blank} | small | mini $o = array( '_element' => 'a', 'href' => (empty($OPTIONS['href'])?'#':$OPTIONS['href']), ); return dgs_element('btn', $text, array_merge($OPTIONS, $o), $print); } function dgs_buttonI($text, $OPTIONS=array(), $print=true) { // create a button // $OPTIONS = array of option settings {including but not limited to:} // '_style' => {blank} | primary | info | success | warning | danger | inverse | link // '_size' => large | {blank} | small | mini $o = array( '_element' => 'input', 'type' => (empty($OPTIONS['type'])?'button':$OPTIONS['type']), 'value' => (empty($OPTIONS['value'])?((!empty($text))?$text:'Submit'):$OPTIONS['value']), ); return dgs_element('btn', '', array_merge($OPTIONS, $o), $print); } function dgs_checkbox($name, $label, $value="1", $checked=false, $OPTIONS=array(), $print=true) { // create a checkbox input // wrapped in CLASS GROUP unless _inline option is true. // $OPTIONS = array of option settings {including but not limited to:} // _inline = false | true (boolean) // _disabled = false | true (boolean) // _help = {help block text, shown after element} // id = {automatically assigned if left blank} if(empty($name)) return false; $o = array( 'checked' => (($checked)?'checked':''), 'value' => $value, 'id' => ((empty($OPTIONS['id']))?dgs_nextRegNameID($name):$OPTIONS['id']), '_element' => 'input', 'type' => 'checkbox', 'name' => $name, 'class' => '', '_help' => '', ); $class = "checkbox".((!empty($OPTIONS['class']))?' '.$OPTIONS['class']:'').(((!empty($OPTIONS['_inline']))&&($OPTIONS['_inline']==true))?' inline':''); $out = '<label class="'.$class.'">'.dgs_element('','', array_merge($OPTIONS, $o), false).'</label>'; if(!empty($OPTIONS['_help'])) $out.=dgs_HELP_OPEN.$OPTIONS['_help'].dgs_HELP_CLOSE; if ((!empty($OPTIONS['_inline']))&&($OPTIONS['_inline']!=true)) $out = dgs_CG_OPEN.$out.dgs_CG_CLOSE; if ($print) { echo $out; return true; } return $out; } function dgs_alert($text, $OPTIONS=array(), $print=true) { // create a dismissable alert box // $OPTIONS = array of option settings {including but not limited to:} // '_style' => {blank} | "error" | "success" | "info" $o = $OPTIONS; $o['_size'] = ((strlen($text) > 80)?'block':''); $o['_element'] = 'div'; $b = array( '_element' => 'button', 'type' => 'button', 'data-dismiss' => 'alert' ); $btn = dgs_element('close', '&times;', $b, false); return dgs_element('alert', $btn.$text, $o, $print ); } dgs_checkbox('mybox', "My Checkbox"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dMo5j
function name:  (null)
number of ops:  26
compiled vars:  !0 = $dgs_regNames
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'dgs_void_tags'
          2        SEND_VAL                                                 '%3Carea%3E%3Cbase%3E%3Cbr%3E%3Ccol%3E%3Ccommand%3E%3Cembed%3E%3Chr%3E%3Cimg%3E%3Cinput%3E%3Clink%3E%3Cmeta%3E%3Cparam%3E%3Csource%3E'
          3        DO_ICALL                                                 
    9     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'dgs_CG_OPEN'
          6        SEND_VAL                                                 '%3Cdiv+class%3D%22control-group%22%3E'
          7        DO_ICALL                                                 
   10     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'dgs_CG_CLOSE'
         10        SEND_VAL                                                 '%3C%2Fdiv%3E'
         11        DO_ICALL                                                 
   11    12        INIT_FCALL                                               'define'
         13        SEND_VAL                                                 'dgs_HELP_OPEN'
         14        SEND_VAL                                                 '%3Cp+class%3D%22help-block%22%3E'
         15        DO_ICALL                                                 
   12    16        INIT_FCALL                                               'define'
         17        SEND_VAL                                                 'dgs_HELP_CLOSE'
         18        SEND_VAL                                                 '%3C%2Fp%3E'
         19        DO_ICALL                                                 
   14    20        ASSIGN                                                   !0, <array>
  161    21        INIT_FCALL                                               'dgs_checkbox'
         22        SEND_VAL                                                 'mybox'
         23        SEND_VAL                                                 'My+Checkbox'
         24        DO_FCALL                                      0          
  162    25      > RETURN                                                   1

Function dgs_isvoidtag:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dMo5j
function name:  dgs_isVoidTag
number of ops:  11
compiled vars:  !0 = $tagName, !1 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        INIT_FCALL                                               'stripos'
          2        FETCH_CONSTANT                                   ~2      'dgs_void_tags'
          3        SEND_VAL                                                 ~2
          4        CONCAT                                           ~3      '%3C', !1
          5        CONCAT                                           ~4      ~3, '%3E'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8        TYPE_CHECK                                  1018  ~6      $5
          9      > RETURN                                                   ~6
   18    10*     > RETURN                                                   null

End of function dgs_isvoidtag

Function dgs_nextregnameid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dMo5j
function name:  dgs_nextRegNameID
number of ops:  13
compiled vars:  !0 = $regName, !1 = $dgs_regNames
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        BIND_GLOBAL                                              !1, 'dgs_regNames'
   22     2        ISSET_ISEMPTY_DIM_OBJ                         0          !1, !0
          3      > JMPZ                                                     ~2, ->7
   23     4    >   FETCH_DIM_RW                                     $3      !1, !0
          5        PRE_INC                                                  $3
          6      > JMP                                                      ->9
   25     7    >   ASSIGN_DIM                                               !1, !0
          8        OP_DATA                                                  0
   27     9    >   FETCH_DIM_R                                      ~6      !1, !0
         10        CONCAT                                           ~7      !0, ~6
         11      > RETURN                                                   ~7
   28    12*     > RETURN                                                   null

End of function dgs_nextregnameid

Function dgs_attributes:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
Branch analysis from position: 11
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/dMo5j
function name:  dgs_attributes
number of ops:  21
compiled vars:  !0 = $OPTIONS, !1 = $out, !2 = $val, !3 = $parm
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
   31     1        ASSIGN                                                   !1, ''
   32     2      > FE_RESET_R                                       $5      !0, ->18
          3    > > FE_FETCH_R                                       ~6      $5, !2, ->18
          4    >   ASSIGN                                                   !3, ~6
   33     5        FETCH_DIM_R                                      ~8      !3, 0
          6        IS_NOT_EQUAL                                     ~9      ~8, '_'
          7      > JMPZ_EX                                          ~9      ~9, ->11
          8    >   ISSET_ISEMPTY_CV                                 ~10     !2
          9        BOOL_NOT                                         ~11     ~10
         10        BOOL                                             ~9      ~11
         11    > > JMPZ                                                     ~9, ->17
         12    >   CONCAT                                           ~12     '+', !3
         13        CONCAT                                           ~13     ~12, '%3D%22'
         14        CONCAT                                           ~14     ~13, !2
         15        CONCAT                                           ~15     ~14, '%22'
         16        ASSIGN_OP                                     8          !1, ~15
   32    17    > > JMP                                                      ->3
         18    >   FE_FREE                                                  $5
   35    19      > RETURN                                                   !1
   36    20*     > RETURN                                                   null

End of function dgs_attributes

Function dgs_element:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 42
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 46) Position 1 = 47, Position 2 = 50
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 53
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
2 jumps found. (Code = 46) Position 1 = 58, Position 2 = 61
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 72
Branch analysis from position: 68
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 85
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 95, Position 2 = 97
Branch analysis from position: 95
1 jumps found. (Code = 42) Position 1 = 98
Branch analysis from position: 98
2 jumps found. (Code = 43) Position 1 = 109, Position 2 = 115
Branch analysis from position: 109
2 jumps found. (Code = 43) Position 1 = 117, Position 2 = 120
Branch analysis from position: 117
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 120
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 115
Branch analysis from position: 97
2 jumps found. (Code = 43) Position 1 = 109, Position 2 = 115
Branch analysis from position: 109
Branch analysis from position: 115
Branch analysis from position: 85
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 85
Branch analysis from position: 83
Branch analysis from position: 85
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 72
Branch analysis from position: 68
Branch analysis from position: 72
Branch analysis from position: 61
Branch analysis from position: 53
2 jumps found. (Code = 46) Position 1 = 58, Position 2 = 61
Branch analysis from position: 58
Branch analysis from position: 61
Branch analysis from position: 50
Branch analysis from position: 42
2 jumps found. (Code = 46) Position 1 = 47, Position 2 = 50
Branch analysis from position: 47
Branch analysis from position: 50
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 42
Branch analysis from position: 35
Branch analysis from position: 42
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
Branch analysis from position: 30
filename:       /in/dMo5j
function name:  dgs_element
number of ops:  122
compiled vars:  !0 = $type, !1 = $text, !2 = $OPTIONS, !3 = $print, !4 = $o, !5 = $element, !6 = $class, !7 = $attr, !8 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
          3        RECV_INIT                                        !3      <true>
   50     4        ASSIGN                                                   !4, !2
   51     5        ISSET_ISEMPTY_DIM_OBJ                         0  ~10     !4, '_element'
          6        BOOL_NOT                                         ~11     ~10
          7      > JMPZ                                                     ~11, ->9
          8    > > RETURN                                                   <false>
   52     9    >   INIT_FCALL                                               'strtolower'
         10        FETCH_DIM_R                                      ~12     !4, '_element'
         11        SEND_VAL                                                 ~12
         12        DO_ICALL                                         $13     
         13        ASSIGN                                                   !5, $13
   53    14        IS_NOT_EQUAL                                             !0, 'icon'
         15      > JMPZ                                                     ~15, ->18
         16    >   QM_ASSIGN                                        ~16     !0
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~16     ''
         19    >   ASSIGN                                                   !6, ~16
   54    20        ISSET_ISEMPTY_DIM_OBJ                         1  ~18     !4, '_style'
         21        BOOL_NOT                                         ~19     ~18
         22      > JMPZ                                                     ~19, ->30
         23    >   ROPE_INIT                                     3  ~21     '+'
         24        ROPE_ADD                                      1  ~21     ~21, !0
         25        ROPE_END                                      2  ~20     ~21, '-'
         26        FETCH_DIM_R                                      ~23     !4, '_style'
         27        CONCAT                                           ~24     ~20, ~23
         28        QM_ASSIGN                                        ~25     ~24
         29      > JMP                                                      ->31
         30    >   QM_ASSIGN                                        ~25     ''
         31    >   ASSIGN_OP                                     8          !6, ~25
   55    32        ISSET_ISEMPTY_DIM_OBJ                         1  ~27     !4, '_size'
         33        BOOL_NOT                                         ~28     ~27
         34      > JMPZ                                                     ~28, ->42
         35    >   ROPE_INIT                                     3  ~30     '+'
         36        ROPE_ADD                                      1  ~30     ~30, !0
         37        ROPE_END                                      2  ~29     ~30, '-'
         38        FETCH_DIM_R                                      ~32     !4, '_size'
         39        CONCAT                                           ~33     ~29, ~32
         40        QM_ASSIGN                                        ~34     ~33
         41      > JMP                                                      ->43
         42    >   QM_ASSIGN                                        ~34     ''
         43    >   ASSIGN_OP                                     8          !6, ~34
   56    44        ISSET_ISEMPTY_DIM_OBJ                         1  ~36     !4, '_disabled'
         45        BOOL_NOT                                         ~37     ~36
         46      > JMPZ_EX                                          ~37     ~37, ->50
         47    >   FETCH_DIM_R                                      ~38     !4, '_disabled'
         48        BOOL                                             ~39     ~38
         49        BOOL                                             ~37     ~39
         50    > > JMPZ                                                     ~37, ->53
         51    >   QM_ASSIGN                                        ~40     '+disabled'
         52      > JMP                                                      ->54
         53    >   QM_ASSIGN                                        ~40     ''
         54    >   ASSIGN_OP                                     8          !6, ~40
   57    55        ISSET_ISEMPTY_DIM_OBJ                         1  ~42     !4, '_inline'
         56        BOOL_NOT                                         ~43     ~42
         57      > JMPZ_EX                                          ~43     ~43, ->61
         58    >   FETCH_DIM_R                                      ~44     !4, '_inline'
         59        BOOL                                             ~45     ~44
         60        BOOL                                             ~43     ~45
         61    > > JMPZ                                                     ~43, ->64
         62    >   QM_ASSIGN                                        ~46     '+inline'
         63      > JMP                                                      ->65
         64    >   QM_ASSIGN                                        ~46     ''
         65    >   ASSIGN_OP                                     8          !6, ~46
   58    66        ISSET_ISEMPTY_DIM_OBJ                         0          !4, 'class'
         67      > JMPZ                                                     ~48, ->72
         68    >   FETCH_DIM_R                                      ~49     !4, 'class'
         69        CONCAT                                           ~50     '+', ~49
         70        QM_ASSIGN                                        ~51     ~50
         71      > JMP                                                      ->73
         72    >   QM_ASSIGN                                        ~51     ''
         73    >   ASSIGN_OP                                     8          !6, ~51
   59    74        INIT_FCALL                                               'trim'
         75        SEND_VAR                                                 !6
         76        DO_ICALL                                         $53     
         77        ASSIGN                                                   !6, $53
   60    78        ASSIGN_DIM                                               !4, 'class'
         79        OP_DATA                                                  !6
   61    80        FETCH_DIM_R                                      ~56     !4, '_disabled'
         81        BOOL                                             ~57     ~56
         82      > JMPZ                                                     ~57, ->85
         83    >   ASSIGN_DIM                                               !4, 'disabled'
         84        OP_DATA                                                  'disabled'
   62    85    >   INIT_FCALL                                               'dgs_attributes'
         86        SEND_VAR                                                 !4
         87        DO_FCALL                                      0  $59     
         88        ASSIGN                                                   !7, $59
   63    89        INIT_FCALL                                               'vsprintf'
         90        INIT_FCALL                                               'dgs_isvoidtag'
         91        SEND_VAR                                                 !5
         92        DO_FCALL                                      0  $61     
         93        BOOL_NOT                                         ~62     $61
         94      > JMPZ                                                     ~62, ->97
         95    >   QM_ASSIGN                                        ~63     '%3C%2F%251%24s%3E'
         96      > JMP                                                      ->98
         97    >   QM_ASSIGN                                        ~63     ''
         98    >   CONCAT                                           ~64     '%3C%251%24s+%252%24s%3E%253%24s', ~63
         99        SEND_VAL                                                 ~64
   64   100        INIT_ARRAY                                       ~65     !5
   65   101        ADD_ARRAY_ELEMENT                                ~65     !7
   66   102        ADD_ARRAY_ELEMENT                                ~65     !1
        103        SEND_VAL                                                 ~65
        104        DO_ICALL                                         $66     
   63   105        ASSIGN                                                   !8, $66
   68   106        ISSET_ISEMPTY_DIM_OBJ                         1  ~68     !4, '_help'
        107        BOOL_NOT                                         ~69     ~68
        108      > JMPZ                                                     ~69, ->115
        109    >   FETCH_CONSTANT                                   ~70     'dgs_HELP_OPEN'
        110        FETCH_DIM_R                                      ~71     !4, '_help'
        111        CONCAT                                           ~72     ~70, ~71
        112        FETCH_CONSTANT                                   ~73     'dgs_HELP_CLOSE'
        113        CONCAT                                           ~74     ~72, ~73
        114        ASSIGN_OP                                     8          !8, ~74
   69   115    >   BOOL                                             ~76     !3
        116      > JMPZ                                                     ~76, ->120
   70   117    >   ECHO                                                     !8
   71   118      > RETURN                                                   <true>
        119*       JMP                                                      ->121
   73   120    > > RETURN                                                   !8
   75   121*     > RETURN                                                   null

End of function dgs_element

Function dgs_button:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dMo5j
function name:  dgs_button
number of ops:  24
compiled vars:  !0 = $text, !1 = $OPTIONS, !2 = $print, !3 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   77     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
          2        RECV_INIT                                        !2      <true>
   83     3        INIT_ARRAY                                       ~4      'button', '_element'
   84     4        ISSET_ISEMPTY_DIM_OBJ                         1          !1, 'type'
          5      > JMPZ                                                     ~5, ->8
          6    >   QM_ASSIGN                                        ~6      'button'
          7      > JMP                                                      ->10
          8    >   FETCH_DIM_R                                      ~7      !1, 'type'
          9        QM_ASSIGN                                        ~6      ~7
         10    >   ADD_ARRAY_ELEMENT                                ~4      ~6, 'type'
   82    11        ASSIGN                                                   !3, ~4
   86    12        INIT_FCALL                                               'dgs_element'
         13        SEND_VAL                                                 'btn'
         14        SEND_VAR                                                 !0
         15        INIT_FCALL                                               'array_merge'
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $9      
         19        SEND_VAR                                                 $9
         20        SEND_VAR                                                 !2
         21        DO_FCALL                                      0  $10     
         22      > RETURN                                                   $10
   87    23*     > RETURN                                                   null

End of function dgs_button

Function dgs_buttona:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dMo5j
function name:  dgs_buttonA
number of ops:  24
compiled vars:  !0 = $text, !1 = $OPTIONS, !2 = $print, !3 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   89     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
          2        RECV_INIT                                        !2      <true>
   95     3        INIT_ARRAY                                       ~4      'a', '_element'
   96     4        ISSET_ISEMPTY_DIM_OBJ                         1          !1, 'href'
          5      > JMPZ                                                     ~5, ->8
          6    >   QM_ASSIGN                                        ~6      '%23'
          7      > JMP                                                      ->10
          8    >   FETCH_DIM_R                                      ~7      !1, 'href'
          9        QM_ASSIGN                                        ~6      ~7
         10    >   ADD_ARRAY_ELEMENT                                ~4      ~6, 'href'
   94    11        ASSIGN                                                   !3, ~4
   98    12        INIT_FCALL                                               'dgs_element'
         13        SEND_VAL                                                 'btn'
         14        SEND_VAR                                                 !0
         15        INIT_FCALL                                               'array_merge'
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $9      
         19        SEND_VAR                                                 $9
         20        SEND_VAR                                                 !2
         21        DO_FCALL                                      0  $10     
         22      > RETURN                                                   $10
   99    23*     > RETURN                                                   null

End of function dgs_buttona

Function dgs_buttoni:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
Branch analysis from position: 21
filename:       /in/dMo5j
function name:  dgs_buttonI
number of ops:  37
compiled vars:  !0 = $text, !1 = $OPTIONS, !2 = $print, !3 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  101     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
          2        RECV_INIT                                        !2      <true>
  107     3        INIT_ARRAY                                       ~4      'input', '_element'
  108     4        ISSET_ISEMPTY_DIM_OBJ                         1          !1, 'type'
          5      > JMPZ                                                     ~5, ->8
          6    >   QM_ASSIGN                                        ~6      'button'
          7      > JMP                                                      ->10
          8    >   FETCH_DIM_R                                      ~7      !1, 'type'
          9        QM_ASSIGN                                        ~6      ~7
         10    >   ADD_ARRAY_ELEMENT                                ~4      ~6, 'type'
  109    11        ISSET_ISEMPTY_DIM_OBJ                         1          !1, 'value'
         12      > JMPZ                                                     ~8, ->21
         13    >   ISSET_ISEMPTY_CV                                 ~9      !0
         14        BOOL_NOT                                         ~10     ~9
         15      > JMPZ                                                     ~10, ->18
         16    >   QM_ASSIGN                                        ~11     !0
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~11     'Submit'
         19    >   QM_ASSIGN                                        ~12     ~11
         20      > JMP                                                      ->23
         21    >   FETCH_DIM_R                                      ~13     !1, 'value'
         22        QM_ASSIGN                                        ~12     ~13
         23    >   ADD_ARRAY_ELEMENT                                ~4      ~12, 'value'
  106    24        ASSIGN                                                   !3, ~4
  111    25        INIT_FCALL                                               'dgs_element'
         26        SEND_VAL                                                 'btn'
         27        SEND_VAL                                                 ''
         28        INIT_FCALL                                               'array_merge'
         29        SEND_VAR                                                 !1
         30        SEND_VAR                                                 !3
         31        DO_ICALL                                         $15     
         32        SEND_VAR                                                 $15
         33        SEND_VAR                                                 !2
         34        DO_FCALL                                      0  $16     
         35      > RETURN                                                   $16
  112    36*     > RETURN                                                   null

End of function dgs_buttoni

Function dgs_checkbox:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 43) Posi

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.94 ms | 1431 KiB | 31 Q