3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST['TO'])&&!empty($_POST['TO'])&&isset($_POST['from'])&&!empty($_POST['from'])) { $to=$_POST['TO']; $subject=$_POST['subject']; $body=$_POST['body']; $from=$_POST['from']; if(mail($to,$subject,$body,$from)) { echo 'Message sent'; } else echo 'Error in sending'; } else echo 'Enter the required fields'; ?> <form action="main.php" method="POST"> TO :<input type="text" name="TO"><br><br> SUBJECT:<input type="text" name="subject"><br><br> Message:<textarea name="body" rows="6" cols="30"></textarea><br><br> From :<input type="text" name="from"><br><br> <input type="submit" value="submit"> </form>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 40
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 11
Branch analysis from position: 7
filename:       /in/oO6s4
function name:  (null)
number of ops:  43
compiled vars:  !0 = $to, !1 = $subject, !2 = $body, !3 = $from
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_IS                                         ~4      '_POST'
          1        ISSET_ISEMPTY_DIM_OBJ                         0  ~5      ~4, 'TO'
          2      > JMPZ_EX                                          ~5      ~5, ->7
          3    >   FETCH_IS                                         ~6      '_POST'
          4        ISSET_ISEMPTY_DIM_OBJ                         1  ~7      ~6, 'TO'
          5        BOOL_NOT                                         ~8      ~7
          6        BOOL                                             ~5      ~8
          7    > > JMPZ_EX                                          ~5      ~5, ->11
          8    >   FETCH_IS                                         ~9      '_POST'
          9        ISSET_ISEMPTY_DIM_OBJ                         0  ~10     ~9, 'from'
         10        BOOL                                             ~5      ~10
         11    > > JMPZ_EX                                          ~5      ~5, ->16
         12    >   FETCH_IS                                         ~11     '_POST'
         13        ISSET_ISEMPTY_DIM_OBJ                         1  ~12     ~11, 'from'
         14        BOOL_NOT                                         ~13     ~12
         15        BOOL                                             ~5      ~13
         16    > > JMPZ                                                     ~5, ->40
    5    17    >   FETCH_R                      global              ~14     '_POST'
         18        FETCH_DIM_R                                      ~15     ~14, 'TO'
         19        ASSIGN                                                   !0, ~15
    6    20        FETCH_R                      global              ~17     '_POST'
         21        FETCH_DIM_R                                      ~18     ~17, 'subject'
         22        ASSIGN                                                   !1, ~18
    7    23        FETCH_R                      global              ~20     '_POST'
         24        FETCH_DIM_R                                      ~21     ~20, 'body'
         25        ASSIGN                                                   !2, ~21
    8    26        FETCH_R                      global              ~23     '_POST'
         27        FETCH_DIM_R                                      ~24     ~23, 'from'
         28        ASSIGN                                                   !3, ~24
   10    29        INIT_FCALL                                               'mail'
         30        SEND_VAR                                                 !0
         31        SEND_VAR                                                 !1
         32        SEND_VAR                                                 !2
         33        SEND_VAR                                                 !3
         34        DO_ICALL                                         $26     
         35      > JMPZ                                                     $26, ->38
   12    36    >   ECHO                                                     'Message+sent'
         37      > JMP                                                      ->39
   15    38    >   ECHO                                                     'Error+in+sending'
         39    > > JMP                                                      ->41
   19    40    >   ECHO                                                     'Enter+the+required+fields'
   23    41    >   ECHO                                                     '%0A%0A%3Cform+action%3D%22main.php%22+method%3D%22POST%22%3E%0A%0ATO+++++%3A%3Cinput+type%3D%22text%22+name%3D%22TO%22%3E%3Cbr%3E%3Cbr%3E%0ASUBJECT%3A%3Cinput+type%3D%22text%22+name%3D%22subject%22%3E%3Cbr%3E%3Cbr%3E%0AMessage%3A%3Ctextarea+name%3D%22body%22+rows%3D%226%22+cols%3D%2230%22%3E%3C%2Ftextarea%3E%3Cbr%3E%3Cbr%3E%0AFrom+++%3A%3Cinput+type%3D%22text%22+name%3D%22from%22%3E%3Cbr%3E%3Cbr%3E%0A%0A++++++++%3Cinput+type%3D%22submit%22+value%3D%22submit%22%3E%0A%0A%3C%2Fform%3E'
   34    42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.53 ms | 1400 KiB | 15 Q