3v4l.org

run code in 300+ PHP versions simultaneously
<?php // display form if user has not clicked submit if (!isset($_POST["submit"])) { ?> <form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>"> From: <input type="text" name="from"><br> Subject: <input type="text" name="subject"><br> Message: <textarea rows="10" cols="40" name="message"></textarea><br> <input type="submit" name="submit" value="Submit Feedback"> </form> <?php } else // the user has submitted the form { // Check if the "from" input field is filled out if (isset($_POST["from"])) { $from = $_POST["from"]; // sender $subject = $_POST["subject"]; $message = $_POST["message"]; // message lines should not exceed 70 characters (PHP rule), so wrap it $message = wordwrap($message, 70); // send mail mail("webmaster@example.com",$subject,$message,"From: $from\n"); echo "Thank you for sending us feedback"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 37
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/i1EpI
function name:  (null)
number of ops:  38
compiled vars:  !0 = $from, !1 = $subject, !2 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_IS                                         ~3      '_POST'
          1        ISSET_ISEMPTY_DIM_OBJ                         0  ~4      ~3, 'submit'
          2        BOOL_NOT                                         ~5      ~4
          3      > JMPZ                                                     ~5, ->10
    7     4    >   ECHO                                                     '++%3Cform+method%3D%22post%22+action%3D%22'
          5        FETCH_R                      global              ~6      '_SERVER'
          6        FETCH_DIM_R                                      ~7      ~6, 'PHP_SELF'
          7        ECHO                                                     ~7
          8        ECHO                                                     '%22%3E%0A++From%3A+%3Cinput+type%3D%22text%22+name%3D%22from%22%3E%3Cbr%3E%0A++Subject%3A+%3Cinput+type%3D%22text%22+name%3D%22subject%22%3E%3Cbr%3E%0A++Message%3A+%3Ctextarea+rows%3D%2210%22+cols%3D%2240%22+name%3D%22message%22%3E%3C%2Ftextarea%3E%3Cbr%3E%0A++%3Cinput+type%3D%22submit%22+name%3D%22submit%22+value%3D%22Submit+Feedback%22%3E%0A++%3C%2Fform%3E%0A++'
          9      > JMP                                                      ->37
   19    10    >   FETCH_IS                                         ~8      '_POST'
         11        ISSET_ISEMPTY_DIM_OBJ                         0          ~8, 'from'
         12      > JMPZ                                                     ~9, ->37
   21    13    >   FETCH_R                      global              ~10     '_POST'
         14        FETCH_DIM_R                                      ~11     ~10, 'from'
         15        ASSIGN                                                   !0, ~11
   22    16        FETCH_R                      global              ~13     '_POST'
         17        FETCH_DIM_R                                      ~14     ~13, 'subject'
         18        ASSIGN                                                   !1, ~14
   23    19        FETCH_R                      global              ~16     '_POST'
         20        FETCH_DIM_R                                      ~17     ~16, 'message'
         21        ASSIGN                                                   !2, ~17
   25    22        INIT_FCALL                                               'wordwrap'
         23        SEND_VAR                                                 !2
         24        SEND_VAL                                                 70
         25        DO_ICALL                                         $19     
         26        ASSIGN                                                   !2, $19
   27    27        INIT_FCALL                                               'mail'
         28        SEND_VAL                                                 'webmaster%40example.com'
         29        SEND_VAR                                                 !1
         30        SEND_VAR                                                 !2
         31        ROPE_INIT                                     3  ~22     'From%3A+'
         32        ROPE_ADD                                      1  ~22     ~22, !0
         33        ROPE_END                                      2  ~21     ~22, '%0A'
         34        SEND_VAL                                                 ~21
         35        DO_ICALL                                                 
   28    36        ECHO                                                     'Thank+you+for+sending+us+feedback'
   30    37    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.06 ms | 1400 KiB | 17 Q