3v4l.org

run code in 300+ PHP versions simultaneously
Calculator <form action = "calculator.php" method = "post"> <table> <table width="300" height="200" border="20"> <tr><td>first number: </tr><td><input type="text" name="num1"><br></td><tr> <tr><td>0perattor: </tr><td><input type="text" name="oper"><br></td><tr> <tr><td>second number: </tr><td><input type="text" name="num2"><br></td><tr> </tr><td></tr><td><input type="submit" value="solve"></td><tr> </table> </form> <?php $num1=$_POST['num1']; $num2=$_POST['num2']; $oper=$_POST['oper']; if($oper=='+'){ $result= $num1+$num2 ; echo "The Sum is $result"; }else if($oper=='-'){ $result= $num1-$num2; echo "The Difference is $result"; }else if($oper=='*'){ $result= $num1*$num2 ; echo "The Product is $result"; }else if($oper=='/'){ $result= $num1/$num2 ; echo "The Quotient is $result"; }else echo" Operator doest not exist" ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 34
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 42
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kioMj
function name:  (null)
number of ops:  44
compiled vars:  !0 = $num1, !1 = $num2, !2 = $oper, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     'Calculator%0A%3Cform+action+%3D+%22calculator.php%22+method+%3D+%22post%22%3E%0A+++%3Ctable%3E%0A+++%3Ctable+width%3D%22300%22+height%3D%22200%22+border%3D%2220%22%3E%0A+++%3Ctr%3E%3Ctd%3Efirst+number%3A+%3C%2Ftr%3E%3Ctd%3E%3Cinput+type%3D%22text%22+name%3D%22num1%22%3E%3Cbr%3E%3C%2Ftd%3E%3Ctr%3E%0A++++%3Ctr%3E%3Ctd%3E0perattor%3A+%3C%2Ftr%3E%3Ctd%3E%3Cinput+type%3D%22text%22+name%3D%22oper%22%3E%3Cbr%3E%3C%2Ftd%3E%3Ctr%3E+%0A%09+%3Ctr%3E%3Ctd%3Esecond+number%3A+%3C%2Ftr%3E%3Ctd%3E%3Cinput+type%3D%22text%22+name%3D%22num2%22%3E%3Cbr%3E%3C%2Ftd%3E%3Ctr%3E%0A+++%3C%2Ftr%3E%3Ctd%3E%3C%2Ftr%3E%3Ctd%3E%3Cinput+type%3D%22submit%22+value%3D%22solve%22%3E%3C%2Ftd%3E%3Ctr%3E%0A+++%3C%2Ftable%3E%0A++%3C%2Fform%3E%0A++%0A%0A'
   17     1        FETCH_R                      global              ~4      '_POST'
          2        FETCH_DIM_R                                      ~5      ~4, 'num1'
          3        ASSIGN                                                   !0, ~5
   18     4        FETCH_R                      global              ~7      '_POST'
          5        FETCH_DIM_R                                      ~8      ~7, 'num2'
          6        ASSIGN                                                   !1, ~8
   19     7        FETCH_R                      global              ~10     '_POST'
          8        FETCH_DIM_R                                      ~11     ~10, 'oper'
          9        ASSIGN                                                   !2, ~11
   21    10        IS_EQUAL                                                 !2, '%2B'
         11      > JMPZ                                                     ~13, ->18
   23    12    >   ADD                                              ~14     !0, !1
         13        ASSIGN                                                   !3, ~14
   24    14        NOP                                                      
         15        FAST_CONCAT                                      ~16     'The+Sum+is++', !3
         16        ECHO                                                     ~16
         17      > JMP                                                      ->43
   25    18    >   IS_EQUAL                                                 !2, '-'
         19      > JMPZ                                                     ~17, ->26
   26    20    >   SUB                                              ~18     !0, !1
         21        ASSIGN                                                   !3, ~18
   27    22        NOP                                                      
         23        FAST_CONCAT                                      ~20     'The+Difference+is++', !3
         24        ECHO                                                     ~20
         25      > JMP                                                      ->43
   28    26    >   IS_EQUAL                                                 !2, '%2A'
         27      > JMPZ                                                     ~21, ->34
   29    28    >   MUL                                              ~22     !0, !1
         29        ASSIGN                                                   !3, ~22
   30    30        NOP                                                      
         31        FAST_CONCAT                                      ~24     'The+Product+is++', !3
         32        ECHO                                                     ~24
         33      > JMP                                                      ->43
   31    34    >   IS_EQUAL                                                 !2, '%2F'
         35      > JMPZ                                                     ~25, ->42
   32    36    >   DIV                                              ~26     !0, !1
         37        ASSIGN                                                   !3, ~26
   33    38        NOP                                                      
         39        FAST_CONCAT                                      ~28     'The+Quotient+is++', !3
         40        ECHO                                                     ~28
         41      > JMP                                                      ->43
   35    42    >   ECHO                                                     '+Operator+doest+not+exist'
   39    43    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.77 ms | 1399 KiB | 13 Q