3v4l.org

run code in 300+ PHP versions simultaneously
<?php $action=$_REQUEST['action']; if ($action=="") /* display the contact form */ { ?> <form action="" method="POST" enctype="multipart/form-data"> <input type="hidden" name="action" value="submit"> Your name:<br> <input name="name" type="text" value="" size="30"/><br> Your email:<br> <input name="email" type="text" value="" size="30"/><br> Your message:<br> <textarea name="message" rows="7" cols="30"></textarea><br> <input type="submit" value="Send email"/> </form> <?php } else /* send the submitted data */ { $name=$_REQUEST['name']; $email=$_REQUEST['email']; $message=$_REQUEST['message']; if (($name=="")||($email=="")||($message=="")) { echo "All fields are required, please fill <a href=\"\">the form</a> again."; } else{ $from="From: $name<$email>\r\nReturn-path: $email"; $subject="Message sent using your contact form"; mail("youremail@yoursite.com", $subject, $message, $from); echo "Email sent!"; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
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: 7
2 jumps found. (Code = 47) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 47) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 20
filename:       /in/XkIeG
function name:  (null)
number of ops:  42
compiled vars:  !0 = $action, !1 = $name, !2 = $email, !3 = $message, !4 = $from, !5 = $subject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_R                      global              ~6      '_REQUEST'
          1        FETCH_DIM_R                                      ~7      ~6, 'action'
          2        ASSIGN                                                   !0, ~7
    3     3        IS_EQUAL                                                 !0, ''
          4      > JMPZ                                                     ~9, ->7
    6     5    >   ECHO                                                     '++++%3Cform++action%3D%22%22+method%3D%22POST%22+enctype%3D%22multipart%2Fform-data%22%3E%0A++++%3Cinput+type%3D%22hidden%22+name%3D%22action%22+value%3D%22submit%22%3E%0A++++Your+name%3A%3Cbr%3E%0A++++%3Cinput+name%3D%22name%22+type%3D%22text%22+value%3D%22%22+size%3D%2230%22%2F%3E%3Cbr%3E%0A++++Your+email%3A%3Cbr%3E%0A++++%3Cinput+name%3D%22email%22+type%3D%22text%22+value%3D%22%22+size%3D%2230%22%2F%3E%3Cbr%3E%0A++++Your+message%3A%3Cbr%3E%0A++++%3Ctextarea+name%3D%22message%22+rows%3D%227%22+cols%3D%2230%22%3E%3C%2Ftextarea%3E%3Cbr%3E%0A++++%3Cinput+type%3D%22submit%22+value%3D%22Send+email%22%2F%3E%0A++++%3C%2Fform%3E%0A++++'
          6      > JMP                                                      ->41
   20     7    >   FETCH_R                      global              ~10     '_REQUEST'
          8        FETCH_DIM_R                                      ~11     ~10, 'name'
          9        ASSIGN                                                   !1, ~11
   21    10        FETCH_R                      global              ~13     '_REQUEST'
         11        FETCH_DIM_R                                      ~14     ~13, 'email'
         12        ASSIGN                                                   !2, ~14
   22    13        FETCH_R                      global              ~16     '_REQUEST'
         14        FETCH_DIM_R                                      ~17     ~16, 'message'
         15        ASSIGN                                                   !3, ~17
   23    16        IS_EQUAL                                         ~19     !1, ''
         17      > JMPNZ_EX                                         ~19     ~19, ->20
         18    >   IS_EQUAL                                         ~20     !2, ''
         19        BOOL                                             ~19     ~20
         20    > > JMPNZ_EX                                         ~19     ~19, ->23
         21    >   IS_EQUAL                                         ~21     !3, ''
         22        BOOL                                             ~19     ~21
         23    > > JMPZ                                                     ~19, ->26
   25    24    >   ECHO                                                     'All+fields+are+required%2C+please+fill+%3Ca+href%3D%22%22%3Ethe+form%3C%2Fa%3E+again.'
         25      > JMP                                                      ->41
   28    26    >   ROPE_INIT                                     6  ~23     'From%3A+'
         27        ROPE_ADD                                      1  ~23     ~23, !1
         28        ROPE_ADD                                      2  ~23     ~23, '%3C'
         29        ROPE_ADD                                      3  ~23     ~23, !2
         30        ROPE_ADD                                      4  ~23     ~23, '%3E%0D%0AReturn-path%3A+'
         31        ROPE_END                                      5  ~22     ~23, !2
         32        ASSIGN                                                   !4, ~22
   29    33        ASSIGN                                                   !5, 'Message+sent+using+your+contact+form'
   30    34        INIT_FCALL                                               'mail'
         35        SEND_VAL                                                 'youremail%40yoursite.com'
         36        SEND_VAR                                                 !5
         37        SEND_VAR                                                 !3
         38        SEND_VAR                                                 !4
         39        DO_ICALL                                                 
   31    40        ECHO                                                     'Email+sent%21'
   34    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.41 ms | 1405 KiB | 15 Q