3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Untitled 1</title> <?php if(isset($_GET['submit'])) { $wholenumber = $_GET['whole']; $exponent = $_GET['exponent']; $total=0; for ($i=0; $i < $exponent; $i++) { $total = $wholenumber * $wholenumber; } echo "Answer is: ".$total."<br/>"; } ?> </head> <body> <h1>Loops Construct</h1> <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <p>Whole Number: <input type="text" name="whole" size="25"></p> <p>Exponent <input type="text" name="exponent" placeholder="example@hotmail.com" size="30"></p> <p><input type="submit" name="submit" value="Compute"></p> </form> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 13
Branch analysis from position: 18
Branch analysis from position: 13
Branch analysis from position: 21
filename:       /in/pN1ha
function name:  (null)
number of ops:  27
compiled vars:  !0 = $wholenumber, !1 = $exponent, !2 = $total, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Transitional%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-transitional.dtd%22%3E%0A%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0A%0A%3Chead%3E%0A%3Cmeta+content%3D%22text%2Fhtml%3B+charset%3Dutf-8%22+http-equiv%3D%22Content-Type%22+%2F%3E%0A%3Ctitle%3EUntitled+1%3C%2Ftitle%3E%0A%0A'
    9     1        FETCH_IS                                         ~4      '_GET'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~4, 'submit'
          3      > JMPZ                                                     ~5, ->21
   11     4    >   FETCH_R                      global              ~6      '_GET'
          5        FETCH_DIM_R                                      ~7      ~6, 'whole'
          6        ASSIGN                                                   !0, ~7
   12     7        FETCH_R                      global              ~9      '_GET'
          8        FETCH_DIM_R                                      ~10     ~9, 'exponent'
          9        ASSIGN                                                   !1, ~10
   13    10        ASSIGN                                                   !2, 0
   15    11        ASSIGN                                                   !3, 0
         12      > JMP                                                      ->16
   16    13    >   MUL                                              ~14     !0, !0
         14        ASSIGN                                                   !2, ~14
   15    15        PRE_INC                                                  !3
         16    >   IS_SMALLER                                               !3, !1
         17      > JMPNZ                                                    ~17, ->13
   19    18    >   CONCAT                                           ~18     'Answer+is%3A+', !2
         19        CONCAT                                           ~19     ~18, '%3Cbr%2F%3E'
         20        ECHO                                                     ~19
   22    21    >   ECHO                                                     '%0A%0A%3C%2Fhead%3E%0A%0A%0A%0A%3Cbody%3E%0A%0A%3Ch1%3ELoops+Construct%3C%2Fh1%3E%0A%0A%3Cform+method%3D%22get%22+action%3D%22'
   32    22        FETCH_R                      global              ~20     '_SERVER'
         23        FETCH_DIM_R                                      ~21     ~20, 'PHP_SELF'
         24        ECHO                                                     ~21
         25        ECHO                                                     '%22%3E%0A%09%09%3Cp%3EWhole+Number%3A+%3Cinput+type%3D%22text%22+name%3D%22whole%22+size%3D%2225%22%3E%3C%2Fp%3E%0A%09%09%3Cp%3EExponent+%3Cinput+type%3D%22text%22+name%3D%22exponent%22+placeholder%3D%22example%40hotmail.com%22+size%3D%2230%22%3E%3C%2Fp%3E%0A%09%09%0A%09%09%3Cp%3E%3Cinput+type%3D%22submit%22+name%3D%22submit%22++value%3D%22Compute%22%3E%3C%2Fp%3E%0A%09%3C%2Fform%3E%0A%0A%0A%3C%2Fbody%3E%0A%0A%3C%2Fhtml%3E'
   42    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.73 ms | 1399 KiB | 13 Q