3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_htmlId = 'kiala_pns'; ?> <?php $_htmlClass = 'kiala_pns'; ?> <?php $_htmlName = 'api_uri_parameters'; ?> <?php $_readonly = '0'; //$this->getElement()->getReadonly() ?> <table cellspacing="0" class="data border" id="packandship_table"> <col width="120" /> <col width="95" /> <col width="1" /> <thead> <tr class="headings"> <th><?php echo Mage::helper('locateandselect')->__('Parameter') ?></th> <th><?php echo Mage::helper('locateandselect')->__('Value') ?></th> <th class="last"><?php echo Mage::helper('locateandselect')->__('Action') ?></th> </tr> </thead> <tbody id="<?php echo $_htmlId ?>_container"></tbody> <tfoot> <tr> <td colspan="4" class="a-right"><?php echo $this->getAddButtonHtml() ?></td> </tr> </tfoot> </table> <script type="text/javascript"> //<![CDATA[ var pnsRowTemplate = '<tr>' + '<td><input class="<?php echo $_htmlClass ?> required-entry" name="groups[kiala][fields][<?php echo $_htmlName ?>][value][{{index}}][param]" id="<?php echo $_htmlId ?>_{{index}}_param"></td>' + '<td class="nobr"><input class="<?php echo $_htmlClass ?> required-entry" type="text" name="groups[kiala][fields][<?php echo $_htmlName ?>][value][{{index}}][val]" id="<?php echo $_htmlId ?>_{{index}}_val" /></td>' + '<td class="last"><input type="hidden" name="groups[kiala][fields][<?php echo $_htmlName ?>][value][{{index}}][delete]" class="delete" value="" id="<?php echo $_htmlId ?>_{{index}}_delete" />' + '<button title="<?php echo Mage::helper("locateandselect")->__("Delete Parameter") ?>" type="button" class="scalable delete icon-btn delete-product-option" id="<?php echo $_htmlId ?>_{{index}}_delete_button" onclick="return lnsControl.deleteItem(event);">' + '<span><?php echo Mage::helper("locateandselect")->__("Delete") ?></span></button></td>' + '</tr>'; var pnsControl = { template: new Template(pnsRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")), itemsCount: 0, addItem : function () { <?php if ($_readonly): ?> if (arguments.length < 2) { return; } <?php endif; ?> var data = { param: '', val: '', readOnly: false, index: this.itemsCount++ }; if(arguments.length >= 2) { data.param = arguments[0]; data.val = arguments[1]; } if (arguments.length == 3) { data.readOnly = arguments[2]; } Element.insert($('<?php echo $_htmlId ?>_container'), { bottom : this.template.evaluate(data) }); $('<?php echo $_htmlId ?>_' + data.index + '_param').value = data.param; $('<?php echo $_htmlId ?>_' + data.index + '_val').value = data.val; if (data.readOnly == '1') { ['param', 'val', 'delete'].each(function(idx){ $('<?php echo $_htmlId ?>_'+data.index+'_'+idx).disabled = true; }); $('<?php echo $_htmlId ?>_'+data.index+'_delete_button').hide(); } <?php if ($_readonly): ?> $('<?php echo $_htmlId ?>_container').select('input', 'select').each(this.disableElement); $('<?php echo $_htmlId ?>_container').up('table').select('button').each(this.disableElement); <?php else: ?> $('<?php echo $_htmlId ?>_container').select('input', 'select').each(function(el){ Event.observe(el, 'change', el.setHasChanges.bind(el)); }); <?php endif; ?> }, disableElement: function(el) { el.disabled = true; el.addClassName('disabled'); }, deleteItem: function(event) { var tr = Event.findElement(event, 'tr'); if (tr) { Element.select(tr, '.delete').each(function(elem){elem.value='1'}); Element.select(tr, ['input', 'select']).each(function(elem){elem.hide()}); Element.hide(tr); Element.addClassName(tr, 'no-display template'); } return false; } }; <?php if (is_array($this->getValues())): ?> <?php foreach ($this->getValues() as $_item): ?> pnsControl.addItem('<?php echo $_item['param'] ?>', '<?php echo $_item['val'] ?>'); <?php endforeach; ?> <?php endif; ?> <?php if ($_readonly): ?> $('<?php echo $_htmlId ?>_container').up('table').select('button') .each(pnsControl.disableElement); <?php endif; ?> $('packandship_table').up().addClassName('grid'); //]]> </script>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 74, Position 2 = 75
Branch analysis from position: 74
2 jumps found. (Code = 43) Position 1 = 87, Position 2 = 93
Branch analysis from position: 87
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
2 jumps found. (Code = 43) Position 1 = 102, Position 2 = 118
Branch analysis from position: 102
2 jumps found. (Code = 77) Position 1 = 107, Position 2 = 116
Branch analysis from position: 107
2 jumps found. (Code = 78) Position 1 = 108, Position 2 = 116
Branch analysis from position: 108
1 jumps found. (Code = 42) Position 1 = 107
Branch analysis from position: 107
Branch analysis from position: 116
2 jumps found. (Code = 43) Position 1 = 120, Position 2 = 123
Branch analysis from position: 120
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 123
Branch analysis from position: 116
Branch analysis from position: 118
Branch analysis from position: 93
2 jumps found. (Code = 43) Position 1 = 102, Position 2 = 118
Branch analysis from position: 102
Branch analysis from position: 118
Branch analysis from position: 75
filename:       /in/iYuo8
function name:  (null)
number of ops:  125
compiled vars:  !0 = $_htmlId, !1 = $_htmlClass, !2 = $_htmlName, !3 = $_readonly, !4 = $_item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ASSIGN                                                   !0, 'kiala_pns'
    2     1        ECHO                                                     '%0A'
    3     2        ASSIGN                                                   !1, 'kiala_pns'
    4     3        ECHO                                                     '%0A'
    5     4        ASSIGN                                                   !2, 'api_uri_parameters'
    6     5        ECHO                                                     '%0A'
    7     6        ASSIGN                                                   !3, '0'
    8     7        ECHO                                                     '%0A%0A%0A%3Ctable+cellspacing%3D%220%22+class%3D%22data+border%22+id%3D%22packandship_table%22%3E%0A%0A++++%3Ccol+width%3D%22120%22+%2F%3E%0A%0A++++%3Ccol+width%3D%2295%22+%2F%3E%0A%0A++++%3Ccol+width%3D%221%22+%2F%3E%0A%0A++++%3Cthead%3E%0A%0A++++++++%3Ctr+class%3D%22headings%22%3E%0A%0A++++++++++++%3Cth%3E'
   23     8        INIT_STATIC_METHOD_CALL                                  'Mage', 'helper'
          9        SEND_VAL_EX                                              'locateandselect'
         10        DO_FCALL                                      0  $9      
         11        INIT_METHOD_CALL                                         $9, '__'
         12        SEND_VAL_EX                                              'Parameter'
         13        DO_FCALL                                      0  $10     
         14        ECHO                                                     $10
         15        ECHO                                                     '%3C%2Fth%3E%0A%0A++++++++++++%3Cth%3E'
   25    16        INIT_STATIC_METHOD_CALL                                  'Mage', 'helper'
         17        SEND_VAL_EX                                              'locateandselect'
         18        DO_FCALL                                      0  $11     
         19        INIT_METHOD_CALL                                         $11, '__'
         20        SEND_VAL_EX                                              'Value'
         21        DO_FCALL                                      0  $12     
         22        ECHO                                                     $12
         23        ECHO                                                     '%3C%2Fth%3E%0A%0A++++++++++++%3Cth+class%3D%22last%22%3E'
   27    24        INIT_STATIC_METHOD_CALL                                  'Mage', 'helper'
         25        SEND_VAL_EX                                              'locateandselect'
         26        DO_FCALL                                      0  $13     
         27        INIT_METHOD_CALL                                         $13, '__'
         28        SEND_VAL_EX                                              'Action'
         29        DO_FCALL                                      0  $14     
         30        ECHO                                                     $14
         31        ECHO                                                     '%3C%2Fth%3E%0A%0A++++++++%3C%2Ftr%3E%0A%0A++++%3C%2Fthead%3E%0A%0A++++%3Ctbody+id%3D%22'
   33    32        ECHO                                                     !0
         33        ECHO                                                     '_container%22%3E%3C%2Ftbody%3E%0A%0A++++%3Ctfoot%3E%0A%0A++++++++%3Ctr%3E%0A%0A++++++++++++%3Ctd+colspan%3D%224%22+class%3D%22a-right%22%3E'
   39    34        FETCH_THIS                                       $15     
         35        INIT_METHOD_CALL                                         $15, 'getAddButtonHtml'
         36        DO_FCALL                                      0  $16     
         37        ECHO                                                     $16
         38        ECHO                                                     '%3C%2Ftd%3E%0A%0A++++++++%3C%2Ftr%3E%0A%0A++++%3C%2Ftfoot%3E%0A%0A%3C%2Ftable%3E%0A%0A%0A%0A%3Cscript+type%3D%22text%2Fjavascript%22%3E%0A%0A++++%2F%2F%3C%21%5BCDATA%5B%0A%0A++++var+pnsRowTemplate+%3D+%27%3Ctr%3E%27%0A%0A++++++++%2B+%27%3Ctd%3E%3Cinput+class%3D%22'
   55    39        ECHO                                                     !1
         40        ECHO                                                     '+required-entry%22+name%3D%22groups%5Bkiala%5D%5Bfields%5D%5B'
         41        ECHO                                                     !2
         42        ECHO                                                     '%5D%5Bvalue%5D%5B%7B%7Bindex%7D%7D%5D%5Bparam%5D%22+id%3D%22'
         43        ECHO                                                     !0
         44        ECHO                                                     '_%7B%7Bindex%7D%7D_param%22%3E%3C%2Ftd%3E%27%0A%0A++++++++%2B+%27%3Ctd+class%3D%22nobr%22%3E%3Cinput+class%3D%22'
   57    45        ECHO                                                     !1
         46        ECHO                                                     '+required-entry%22+type%3D%22text%22+name%3D%22groups%5Bkiala%5D%5Bfields%5D%5B'
         47        ECHO                                                     !2
         48        ECHO                                                     '%5D%5Bvalue%5D%5B%7B%7Bindex%7D%7D%5D%5Bval%5D%22+id%3D%22'
         49        ECHO                                                     !0
         50        ECHO                                                     '_%7B%7Bindex%7D%7D_val%22+%2F%3E%3C%2Ftd%3E%27%0A%0A++++++++%2B+%27%3Ctd+class%3D%22last%22%3E%3Cinput+type%3D%22hidden%22+name%3D%22groups%5Bkiala%5D%5Bfields%5D%5B'
   59    51        ECHO                                                     !2
         52        ECHO                                                     '%5D%5Bvalue%5D%5B%7B%7Bindex%7D%7D%5D%5Bdelete%5D%22+class%3D%22delete%22+value%3D%22%22+id%3D%22'
         53        ECHO                                                     !0
         54        ECHO                                                     '_%7B%7Bindex%7D%7D_delete%22+%2F%3E%27%0A%0A++++++++%2B+%27%3Cbutton+title%3D%22'
   61    55        INIT_STATIC_METHOD_CALL                                  'Mage', 'helper'
         56        SEND_VAL_EX                                              'locateandselect'
         57        DO_FCALL                                      0  $17     
         58        INIT_METHOD_CALL                                         $17, '__'
         59        SEND_VAL_EX                                              'Delete+Parameter'
         60        DO_FCALL                                      0  $18     
         61        ECHO                                                     $18
         62        ECHO                                                     '%22+type%3D%22button%22+class%3D%22scalable+delete+icon-btn+delete-product-option%22+id%3D%22'
         63        ECHO                                                     !0
         64        ECHO                                                     '_%7B%7Bindex%7D%7D_delete_button%22+onclick%3D%22return+lnsControl.deleteItem%28event%29%3B%22%3E%27%0A%0A++++++++%2B+%27%3Cspan%3E'
   63    65        INIT_STATIC_METHOD_CALL                                  'Mage', 'helper'
         66        SEND_VAL_EX                                              'locateandselect'
         67        DO_FCALL                                      0  $19     
         68        INIT_METHOD_CALL                                         $19, '__'
         69        SEND_VAL_EX                                              'Delete'
         70        DO_FCALL                                      0  $20     
         71        ECHO                                                     $20
         72        ECHO                                                     '%3C%2Fspan%3E%3C%2Fbutton%3E%3C%2Ftd%3E%27%0A%0A++++++++%2B+%27%3C%2Ftr%3E%27%3B%0A%0A%0A%0A++++var+pnsControl+%3D+%7B%0A%0A++++++++template%3A+new+Template%28pnsRowTemplate%2C+new+RegExp%28%27%28%5E%7C.%7C%5C%5Cr%7C%5C%5Cn%29%28%7B%7B%5C%5Cs%2A%28%5C%5Cw%2B%29%5C%5Cs%2A%7D%7D%29%27%2C+%22%22%29%29%2C%0A%0A++++++++itemsCount%3A+0%2C%0A%0A++++++++addItem+%3A+function+%28%29+%7B%0A%0A'
   77    73      > JMPZ                                                     !3, ->75
   78    74    >   ECHO                                                     '%0A++++++++++++++++if+%28arguments.length+%3C+2%29+%7B%0A%0A++++++++++++++++++++return%3B%0A%0A++++++++++++++++%7D%0A%0A'
   86    75    >   ECHO                                                     '%0A++++++++++++var+data+%3D+%7B%0A%0A++++++++++++++++param%3A+%27%27%2C%0A%0A++++++++++++++++val%3A+%27%27%2C%0A%0A++++++++++++++++readOnly%3A+false%2C%0A%0A++++++++++++++++index%3A+this.itemsCount%2B%2B%0A%0A++++++++++++%7D%3B%0A%0A%0A%0A++++++++++++if%28arguments.length+%3E%3D+2%29+%7B%0A%0A++++++++++++++++data.param+%3D+arguments%5B0%5D%3B%0A%0A++++++++++++++++data.val+++%3D+arguments%5B1%5D%3B%0A%0A++++++++++++%7D%0A%0A++++++++++++if+%28arguments.length+%3D%3D+3%29+%7B%0A%0A++++++++++++++++data.readOnly+%3D+arguments%5B2%5D%3B%0A%0A++++++++++++%7D%0A%0A%0A%0A++++++++++++Element.insert%28%24%28%27'
  117    76        ECHO                                                     !0
         77        ECHO                                                     '_container%27%29%2C+%7B%0A%0A++++++++++++++++bottom+%3A+this.template.evaluate%28data%29%0A%0A++++++++++++%7D%29%3B%0A%0A%0A%0A++++++++++++%24%28%27'
  125    78        ECHO                                                     !0
         79        ECHO                                                     '_%27+%2B+data.index+%2B+%27_param%27%29.value+%3D+data.param%3B%0A%0A++++++++++++%24%28%27'
  127    80        ECHO                                                     !0
         81        ECHO                                                     '_%27+%2B+data.index+%2B+%27_val%27%29.value+%3D+data.val%3B%0A%0A%0A%0A++++++++++++if+%28data.readOnly+%3D%3D+%271%27%29+%7B%0A%0A++++++++++++++++%5B%27param%27%2C+%27val%27%2C+%27delete%27%5D.each%28function%28idx%29%7B%0A%0A++++++++++++++++++++%24%28%27'
  135    82        ECHO                                                     !0
         83        ECHO                                                     '_%27%2Bdata.index%2B%27_%27%2Bidx%29.disabled+%3D+true%3B%0A%0A++++++++++++++++%7D%29%3B%0A%0A++++++++++++++++%24%28%27'
  139    84        ECHO                                                     !0
         85        ECHO                                                     '_%27%2Bdata.index%2B%27_delete_button%27%29.hide%28%29%3B%0A%0A++++++++++++%7D%0A%0A%0A%0A'
  145    86      > JMPZ                                                     !3, ->93
  146    87    >   ECHO                                                     '%0A++++++++++++++++%24%28%27'
  147    88        ECHO                                                     !0
         89        ECHO                                                     '_container%27%29.select%28%27input%27%2C+%27select%27%29.each%28this.disableElement%29%3B%0A%0A++++++++++++++++%24%28%27'
  149    90        ECHO                                                     !0
         91        ECHO                                                     '_container%27%29.up%28%27table%27%29.select%28%27button%27%29.each%28this.disableElement%29%3B%0A%0A'
         92      > JMP                                                      ->96
  152    93    >   ECHO                                                     '%0A++++++++++++++++%24%28%27'
  153    94        ECHO                                                     !0
         95        ECHO                                                     '_container%27%29.select%28%27input%27%2C+%27select%27%29.each%28function%28el%29%7B+Event.observe%28el%2C+%27change%27%2C+el.setHasChanges.bind%28el%29%29%3B+%7D%29%3B%0A%0A'
  156    96    >   ECHO                                                     '%0A++++++++%7D%2C%0A%0A++++++++disableElement%3A+function%28el%29+%7B%0A%0A++++++++++++el.disabled+%3D+true%3B%0A%0A++++++++++++el.addClassName%28%27disabled%27%29%3B%0A%0A++++++++%7D%2C%0A%0A++++++++deleteItem%3A+function%28event%29+%7B%0A%0A++++++++++++var+tr+%3D+Event.findElement%28event%2C+%27tr%27%29%3B%0A%0A++++++++++++if+%28tr%29+%7B%0A%0A++++++++++++++++Element.select%28tr%2C+%27.delete%27%29.each%28function%28elem%29%7Belem.value%3D%271%27%7D%29%3B%0A%0A++++++++++++++++Element.select%28tr%2C+%5B%27input%27%2C+%27select%27%5D%29.each%28function%28elem%29%7Belem.hide%28%29%7D%29%3B%0A%0A++++++++++++++++Element.hide%28tr%29%3B%0A%0A++++++++++++++++Element.addClassName%28tr%2C+%27no-display+template%27%29%3B%0A%0A++++++++++++%7D%0A%0A++++++++++++return+false%3B%0A%0A++++++++%7D%0A%0A++++%7D%3B%0A%0A'
  189    97        FETCH_THIS                                       $21     
         98        INIT_METHOD_CALL                                         $21, 'getValues'
         99        DO_FCALL                                      0  $22     
        100        TYPE_CHECK                                  128          $22
        101      > JMPZ                                                     ~23, ->118
  190   102    >   ECHO                                                     '%0A++++'
  191   103        FETCH_THIS                                       $24     
        104        INIT_METHOD_CALL                                         $24, 'getValues'
        105        DO_FCALL                                      0  $25     
        106      > FE_RESET_R                                       $26     $25, ->116
        107    > > FE_FETCH_R                                               $26, !4, ->116
  192   108    >   ECHO                                                     '%0A++++++++++++pnsControl.addItem%28%27'
  193   109        FETCH_DIM_R                                      ~27     !4, 'param'
        110        ECHO                                                     ~27
        111        ECHO                                                     '%27%2C+%27'
        112        FETCH_DIM_R                                      ~28     !4, 'val'
        113        ECHO                                                     ~28
        114        ECHO                                                     '%27%29%3B%0A%0A++++'
  191   115      > JMP                                                      ->107
        116    >   FE_FREE                                                  $26
  196   117        ECHO                                                     '%0A'
  198   118    >   ECHO                                                     '%0A'
  199   119      > JMPZ                                                     !3, ->123
  200   120    >   ECHO                                                     '%0A++++++++%24%28%27'
  201   121        ECHO                                                     !0
        122        ECHO                                                     '_container%27%29.up%28%27table%27%29.select%28%27button%27%29%0A%0A++++++++.each%28pnsControl.disableElement%29%3B%0A%0A'
  206   123    >   ECHO                                                     '%0A++++%24%28%27packandship_table%27%29.up%28%29.addClassName%28%27grid%27%29%3B%0A%0A++++%2F%2F%5D%5D%3E%0A%0A%3C%2Fscript%3E'
  211   124      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.18 ms | 1415 KiB | 13 Q