3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> <script src="jquery-2.1.1.min.js"></script> <script> $(document).ready(function(){ $("#btnKomentiraj").click(function(){ var selectElement = document.getElementById('selectElement'), textField = document.getElementById('txtField'), textValue = textField.value, selectedValue = selectElement.value; // ne koristi se html mada bi se moglo kako se asdrzaj nebi nadopunjavao $("#divKomentari").append("<p>Komentar: " + textValue + "</p><p>Ocjena komentara: " + selectedValue + "</p>"); }); $("#btnClear").click(function(){ $("#divKomentari").empty(); }); }); </script> </head> <body> <?php $ocjene =array('lose','super','dobro'); echo 'Komentar: '; echo '<input type="text" id="txtField" style="width:200px;">'; echo '<select id="selectElement" style="margin-left:10px;">'; foreach($ocjene as $opis){ echo "<option value='{$opis}'>{$opis}</option>"; } echo '</select>'; echo '<button id="btnKomentiraj" style="margin-left:10px;">Komentiraj</button>'; ?> <div id="divKomentari"></div> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/SQ3cn
function name:  (null)
number of ops:  19
compiled vars:  !0 = $ocjene, !1 = $opis
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A++++%3Chead%3E%0A++++++++%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3DUTF-8%22%3E%0A++++++++%3Ctitle%3E%3C%2Ftitle%3E%0A++++++++%0A++++++++%3Cscript+src%3D%22jquery-2.1.1.min.js%22%3E%3C%2Fscript%3E%0A++++++++%3Cscript%3E%0A++++++++++++%24%28document%29.ready%28function%28%29%7B%0A++++++++++++++++%24%28%22%23btnKomentiraj%22%29.click%28function%28%29%7B%0A+++++++++++++++++++var++selectElement+%3D+document.getElementById%28%27selectElement%27%29%2C%0A++++++++++++++++++++++++textField+%3D+document.getElementById%28%27txtField%27%29%2C%0A++++++++++++++++++++++++textValue+%3D+textField.value%2C%0A++++++++++++++++++++++++selectedValue+%3D+selectElement.value%3B%0A+++++++++++++++++++%0A+++++++++++++++++++%2F%2F+ne+koristi+se+html+mada+bi+se+moglo+kako+se+asdrzaj+nebi+nadopunjavao%0A+++++++++++++++++++%24%28%22%23divKomentari%22%29.append%28%22%3Cp%3EKomentar%3A+%22+%2B+textValue+%2B+%22%3C%2Fp%3E%3Cp%3EOcjena+komentara%3A+%22+%2B+selectedValue+%2B+%22%3C%2Fp%3E%22%29%3B+%0A++++++++++++++++%7D%29%3B%0A++++++++++++++++%24%28%22%23btnClear%22%29.click%28function%28%29%7B%0A++++++++++++++++++++%24%28%22%23divKomentari%22%29.empty%28%29%3B+%0A++++++++++++++++%7D%29%3B%0A++++++++++++%7D%29%3B%0A++++++++%3C%2Fscript%3E%0A++++%3C%2Fhead%3E%0A++++%3Cbody%3E%0A++++++++'
   27     1        ASSIGN                                                   !0, <array>
   28     2        ECHO                                                     'Komentar%3A+'
   29     3        ECHO                                                     '%3Cinput+type%3D%22text%22+id%3D%22txtField%22+style%3D%22width%3A200px%3B%22%3E'
   30     4        ECHO                                                     '%3Cselect+id%3D%22selectElement%22+style%3D%22margin-left%3A10px%3B%22%3E'
   31     5      > FE_RESET_R                                       $3      !0, ->14
          6    > > FE_FETCH_R                                               $3, !1, ->14
   32     7    >   ROPE_INIT                                     5  ~5      '%3Coption+value%3D%27'
          8        ROPE_ADD                                      1  ~5      ~5, !1
          9        ROPE_ADD                                      2  ~5      ~5, '%27%3E'
         10        ROPE_ADD                                      3  ~5      ~5, !1
         11        ROPE_END                                      4  ~4      ~5, '%3C%2Foption%3E'
         12        ECHO                                                     ~4
   31    13      > JMP                                                      ->6
         14    >   FE_FREE                                                  $3
   34    15        ECHO                                                     '%3C%2Fselect%3E'
   35    16        ECHO                                                     '%3Cbutton+id%3D%22btnKomentiraj%22+style%3D%22margin-left%3A10px%3B%22%3EKomentiraj%3C%2Fbutton%3E'
   37    17        ECHO                                                     '++++++++%0A++++++++%3Cdiv+id%3D%22divKomentari%22%3E%3C%2Fdiv%3E%0A++++++++%0A++++%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   41    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.07 ms | 1386 KiB | 13 Q