3v4l.org

run code in 300+ PHP versions simultaneously
<html> <body> <style> .error{ color: red; } </style> </body> </html> <?php $NAME = $EMAIL = $MESSAGE = ""; $NAMERR = $EMAILRR = $MESSAGERR = ""; if($_SERVER["REQUEST_METHOD"] == "POST"){ if(!empty($_POST["NAME"])){ $NAME = Code($_POST["NAME"]); } else{ $NAMERR = "Please Enter Name"; } if(!empty($_POST["EMAIL"])){ $NAME = Code($_POST["EMAIL"]); } else{ $EMAILRR = "Please Enter Email"; } if(!empty($_POST["MESSAGE"])){ $NAME = Code($_POST["MESSAGE"]); } else{ $MESSAGERR = "Please Enter Message"; } } function Code($Code){ $Code = htmlspecialchars($Code); $Code = trim($Code); $Code = stripslashes($Code); return $Code; } ?> <form method="post" action=" <?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> <p> <span class="error">*<?php echo $NAMERR;?></span> Name: <br> <input type="text" name="NAME"> <br> <br> <span class="error">*<?php echo $EMAILRR;?></span> Email: <br> <input type="email" name="EMAIL"> <br> <br> <span class="error">*<?php echo $MESSAGERR;?></span> Message: <br> <textarea name="MESSAGE" rows="5" colls="40"></textarea> <br> <br> <input type="submit" name="submit" value="Send"> </p> </form> <?php echo $NAME; echo "<br>"; echo $EMAIL; echo "<br>"; echo $MESSAGE; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 50
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 23
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 36
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 49
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 49
Branch analysis from position: 41
Branch analysis from position: 49
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 36
Branch analysis from position: 28
Branch analysis from position: 36
Branch analysis from position: 50
filename:       /in/Gce0G
function name:  (null)
number of ops:  70
compiled vars:  !0 = $NAME, !1 = $EMAIL, !2 = $MESSAGE, !3 = $NAMERR, !4 = $EMAILRR, !5 = $MESSAGERR
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A++++%3Cbody%3E%0A++++++++%3Cstyle%3E%0A++++++++++++.error%7B%0A++++++++++++++++color%3A+red%3B%0A++++++++++++%7D%0A++++++++%3C%2Fstyle%3E%0A++++%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A'
   11     1        ASSIGN                                           ~6      !2, ''
          2        ASSIGN                                           ~7      !1, ~6
          3        ASSIGN                                                   !0, ~7
   12     4        ASSIGN                                           ~9      !5, ''
          5        ASSIGN                                           ~10     !4, ~9
          6        ASSIGN                                                   !3, ~10
   13     7        FETCH_R                      global              ~12     '_SERVER'
          8        FETCH_DIM_R                                      ~13     ~12, 'REQUEST_METHOD'
          9        IS_EQUAL                                                 ~13, 'POST'
         10      > JMPZ                                                     ~14, ->50
   14    11    >   FETCH_IS                                         ~15     '_POST'
         12        ISSET_ISEMPTY_DIM_OBJ                         1  ~16     ~15, 'NAME'
         13        BOOL_NOT                                         ~17     ~16
         14      > JMPZ                                                     ~17, ->23
   15    15    >   INIT_FCALL_BY_NAME                                       'Code'
         16        CHECK_FUNC_ARG                                           
         17        FETCH_FUNC_ARG               global              $18     '_POST'
         18        FETCH_DIM_FUNC_ARG                               $19     $18, 'NAME'
         19        SEND_FUNC_ARG                                            $19
         20        DO_FCALL                                      0  $20     
         21        ASSIGN                                                   !0, $20
         22      > JMP                                                      ->24
   17    23    >   ASSIGN                                                   !3, 'Please+Enter+Name'
   19    24    >   FETCH_IS                                         ~23     '_POST'
         25        ISSET_ISEMPTY_DIM_OBJ                         1  ~24     ~23, 'EMAIL'
         26        BOOL_NOT                                         ~25     ~24
         27      > JMPZ                                                     ~25, ->36
   20    28    >   INIT_FCALL_BY_NAME                                       'Code'
         29        CHECK_FUNC_ARG                                           
         30        FETCH_FUNC_ARG               global              $26     '_POST'
         31        FETCH_DIM_FUNC_ARG                               $27     $26, 'EMAIL'
         32        SEND_FUNC_ARG                                            $27
         33        DO_FCALL                                      0  $28     
         34        ASSIGN                                                   !0, $28
         35      > JMP                                                      ->37
   22    36    >   ASSIGN                                                   !4, 'Please+Enter+Email'
   24    37    >   FETCH_IS                                         ~31     '_POST'
         38        ISSET_ISEMPTY_DIM_OBJ                         1  ~32     ~31, 'MESSAGE'
         39        BOOL_NOT                                         ~33     ~32
         40      > JMPZ                                                     ~33, ->49
   25    41    >   INIT_FCALL_BY_NAME                                       'Code'
         42        CHECK_FUNC_ARG                                           
         43        FETCH_FUNC_ARG               global              $34     '_POST'
         44        FETCH_DIM_FUNC_ARG                               $35     $34, 'MESSAGE'
         45        SEND_FUNC_ARG                                            $35
         46        DO_FCALL                                      0  $36     
         47        ASSIGN                                                   !0, $36
         48      > JMP                                                      ->50
   27    49    >   ASSIGN                                                   !5, 'Please+Enter+Message'
   37    50    >   ECHO                                                     '%3Cform+method%3D%22post%22+action%3D%22%0A'
   38    51        INIT_FCALL                                               'htmlspecialchars'
         52        FETCH_R                      global              ~39     '_SERVER'
         53        FETCH_DIM_R                                      ~40     ~39, 'PHP_SELF'
         54        SEND_VAL                                                 ~40
         55        DO_ICALL                                         $41     
         56        ECHO                                                     $41
         57        ECHO                                                     '%22%3E%0A++++%3Cp%3E%0A++++++++%3Cspan+class%3D%22error%22%3E%2A'
   40    58        ECHO                                                     !3
         59        ECHO                                                     '%3C%2Fspan%3E%0A++++++++Name%3A%0A++++++++%3Cbr%3E%0A++++++++%3Cinput+type%3D%22text%22+name%3D%22NAME%22%3E%0A++++++++%3Cbr%3E%0A++++++++%3Cbr%3E%0A++++++++%3Cspan+class%3D%22error%22%3E%2A'
   46    60        ECHO                                                     !4
         61        ECHO                                                     '%3C%2Fspan%3E%0A++++++++Email%3A%0A++++++++%3Cbr%3E%0A++++++++%3Cinput+type%3D%22email%22+name%3D%22EMAIL%22%3E%0A++++++++%3Cbr%3E%0A++++++++%3Cbr%3E%0A++++++++%3Cspan+class%3D%22error%22%3E%2A'
   52    62        ECHO                                                     !5
         63        ECHO                                                     '%3C%2Fspan%3E%0A++++++++Message%3A%0A++++++++%3Cbr%3E%0A++++++++%3Ctextarea+name%3D%22MESSAGE%22++rows%3D%225%22+colls%3D%2240%22%3E%3C%2Ftextarea%3E%0A++++++++%3Cbr%3E%0A++++++++%3Cbr%3E%0A++++++++%3Cinput+type%3D%22submit%22+name%3D%22submit%22+value%3D%22Send%22%3E%0A++++%3C%2Fp%3E%0A%3C%2Fform%3E%0A'
   62    64        ECHO                                                     !0
   63    65        ECHO                                                     '%3Cbr%3E'
   64    66        ECHO                                                     !1
   65    67        ECHO                                                     '%3Cbr%3E'
   66    68        ECHO                                                     !2
   67    69      > RETURN                                                   1

Function code:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gce0G
function name:  Code
number of ops:  15
compiled vars:  !0 = $Code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
   31     1        INIT_FCALL                                               'htmlspecialchars'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   32     5        INIT_FCALL                                               'trim'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        ASSIGN                                                   !0, $3
   33     9        INIT_FCALL                                               'stripslashes'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !0, $5
   34    13      > RETURN                                                   !0
   35    14*     > RETURN                                                   null

End of function code

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.63 ms | 1404 KiB | 19 Q