3v4l.org

run code in 300+ PHP versions simultaneously
<html> <h1 background="blue"><em>Another form</em></h1> <form align="center" method="Post" action="<?php htmlspecialchars($_SERVER["php_self"]);?>"> First Name:<input type="text" name="name1"><br> Last Name :<input type="text" name="name2"><br> Age :<input type="integer" List="age" name="age"> <datalist id="age"> <option value="1">18</option> <option value="2">19</option> <option value="3">20</option> <option value="4">21</option> </datalist><br> Country:<input type="text" list="country" name="country"> <datalist option= "country"> <option id="mylist"> <option value="Angola"> <option value="ARgentina"> <option value="Afghanistan"> <option value="Armenia"> <option value="Benin"> <option value="Bruei"> <option value="Belgium"> <option value="Cameroun"> <option value="Congo DR"> <option value="Denmark"> <option value="Estonia"> <option value="Eritrea"> </datalist><br> E-mail:<input type="text" name="email"><br> Password:<input type="password"><br> Sex<br><input type="radio" name="sex" value="Male" checked="checked" >Male <input type="radio" name="sex" value="Female">Female<br> comment<textarea name="comment" rows="6" columns="250" background="#f7f7f7">your comment here</textarea> <input type="submit" value="SUBMIT"> <?php if(isset($_POST["SUBMIT"])){ echo "your name is " .$name." you are wlcome"; } //define variables and set to empty values $first_name= $last_name= $age= $country =$email= $password = $sex = $comment; if( $_SERVER[REQUEST_METHOD]=="POST"){ $first_name= test_input($_POST["name1"]); $last_name= test_input($_POST["name2"]); $age= test_input($_POST["age"]); $country= test_input($_POST["country"]); $email= test_input($_POST["email"]); $password+ test_input($_POST["password"]); $sex= test_input($_POST["sex"]); $comment= test_input($_POST["comment"]); } function test_input($data){ $data= trim($data); $data= striplash($data); $data= htmlspecialchars($data); return $data; } ?> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 82
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 82
Branch analysis from position: 13
filename:       /in/GDr03
function name:  (null)
number of ops:  84
compiled vars:  !0 = $name, !1 = $first_name, !2 = $last_name, !3 = $age, !4 = $country, !5 = $email, !6 = $password, !7 = $sex, !8 = $comment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A%09%3Ch1+background%3D%22blue%22%3E%3Cem%3EAnother+form%3C%2Fem%3E%3C%2Fh1%3E%0A%09%3Cform+align%3D%22center%22+method%3D%22Post%22+action%3D%22'
    3     1        INIT_FCALL                                               'htmlspecialchars'
          2        FETCH_R                      global              ~9      '_SERVER'
          3        FETCH_DIM_R                                      ~10     ~9, 'php_self'
          4        SEND_VAL                                                 ~10
          5        DO_ICALL                                                 
          6        ECHO                                                     '%22%3E%0A%09First+Name%3A%3Cinput+type%3D%22text%22+name%3D%22name1%22%3E%3Cbr%3E%0A%09Last+Name+%3A%3Cinput+type%3D%22text%22+name%3D%22name2%22%3E%3Cbr%3E%0A%09Age+++++++%3A%3Cinput+type%3D%22integer%22+List%3D%22age%22+name%3D%22age%22%3E%0A%09%09%3Cdatalist+id%3D%22age%22%3E%0A%09%09%09%3Coption+value%3D%221%22%3E18%3C%2Foption%3E%0A%09%09%09%3Coption+value%3D%222%22%3E19%3C%2Foption%3E%0A%09%09%09%3Coption+value%3D%223%22%3E20%3C%2Foption%3E%0A%09%09%09%3Coption+value%3D%224%22%3E21%3C%2Foption%3E%0A%09%09%09%09%09%09%3C%2Fdatalist%3E%3Cbr%3E%0A%09%09%09%09%09%09Country%3A%3Cinput+type%3D%22text%22+list%3D%22country%22+name%3D%22country%22%3E%0A%09%09%09%09%09%09%3Cdatalist+option%3D+%22country%22%3E%0A%09%09%09%09%09%09%3Coption+id%3D%22mylist%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Angola%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22ARgentina%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Afghanistan%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Armenia%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Benin%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Bruei%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Belgium%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Cameroun%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Congo+DR%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Denmark%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Estonia%22%3E%0A%09%09%09%09%09%09%09%3Coption+value%3D%22Eritrea%22%3E%0A%09%09%09%09%09%09%09%09%3C%2Fdatalist%3E%3Cbr%3E%0A%09%09%09%09%09%09%09%09E-mail%3A%3Cinput+type%3D%22text%22+name%3D%22email%22%3E%3Cbr%3E%0A%09%09%09%09%09%09%09%09Password%3A%3Cinput+type%3D%22password%22%3E%3Cbr%3E%0A%09%09%09%09%09%09%09%09Sex%3Cbr%3E%3Cinput+type%3D%22radio%22+name%3D%22sex%22+value%3D%22Male%22+checked%3D%22checked%22+%3EMale%0A%09%09%09%09%09%09%09%09%3Cinput+type%3D%22radio%22+name%3D%22sex%22+value%3D%22Female%22%3EFemale%3Cbr%3E%0A%09%09%09%09%09%09%09%09comment%3Ctextarea+name%3D%22comment%22+rows%3D%226%22+columns%3D%22250%22+background%3D%22%23f7f7f7%22%3Eyour+comment+here%3C%2Ftextarea%3E%0A%09%09%09%09%09%09%09%09%3Cinput+type%3D%22submit%22+value%3D%22SUBMIT%22%3E%0A%09%09%09%09%09%09%09%09'
   35     7        FETCH_IS                                         ~12     '_POST'
          8        ISSET_ISEMPTY_DIM_OBJ                         0          ~12, 'SUBMIT'
          9      > JMPZ                                                     ~13, ->13
   36    10    >   CONCAT                                           ~14     'your+name+is+', !0
         11        CONCAT                                           ~15     ~14, '+you+are+wlcome'
         12        ECHO                                                     ~15
   39    13    >   ASSIGN                                           ~16     !7, !8
         14        ASSIGN                                           ~17     !6, ~16
         15        ASSIGN                                           ~18     !5, ~17
         16        ASSIGN                                           ~19     !4, ~18
         17        ASSIGN                                           ~20     !3, ~19
         18        ASSIGN                                           ~21     !2, ~20
         19        ASSIGN                                                   !1, ~21
   40    20        FETCH_CONSTANT                                   ~24     'REQUEST_METHOD'
         21        FETCH_R                      global              ~23     '_SERVER'
         22        FETCH_DIM_R                                      ~25     ~23, ~24
         23        IS_EQUAL                                                 ~25, 'POST'
         24      > JMPZ                                                     ~26, ->82
   41    25    >   INIT_FCALL_BY_NAME                                       'test_input'
         26        CHECK_FUNC_ARG                                           
         27        FETCH_FUNC_ARG               global              $27     '_POST'
         28        FETCH_DIM_FUNC_ARG                               $28     $27, 'name1'
         29        SEND_FUNC_ARG                                            $28
         30        DO_FCALL                                      0  $29     
         31        ASSIGN                                                   !1, $29
   42    32        INIT_FCALL_BY_NAME                                       'test_input'
         33        CHECK_FUNC_ARG                                           
         34        FETCH_FUNC_ARG               global              $31     '_POST'
         35        FETCH_DIM_FUNC_ARG                               $32     $31, 'name2'
         36        SEND_FUNC_ARG                                            $32
         37        DO_FCALL                                      0  $33     
         38        ASSIGN                                                   !2, $33
   43    39        INIT_FCALL_BY_NAME                                       'test_input'
         40        CHECK_FUNC_ARG                                           
         41        FETCH_FUNC_ARG               global              $35     '_POST'
         42        FETCH_DIM_FUNC_ARG                               $36     $35, 'age'
         43        SEND_FUNC_ARG                                            $36
         44        DO_FCALL                                      0  $37     
         45        ASSIGN                                                   !3, $37
   44    46        INIT_FCALL_BY_NAME                                       'test_input'
         47        CHECK_FUNC_ARG                                           
         48        FETCH_FUNC_ARG               global              $39     '_POST'
         49        FETCH_DIM_FUNC_ARG                               $40     $39, 'country'
         50        SEND_FUNC_ARG                                            $40
         51        DO_FCALL                                      0  $41     
         52        ASSIGN                                                   !4, $41
   45    53        INIT_FCALL_BY_NAME                                       'test_input'
         54        CHECK_FUNC_ARG                                           
         55        FETCH_FUNC_ARG               global              $43     '_POST'
         56        FETCH_DIM_FUNC_ARG                               $44     $43, 'email'
         57        SEND_FUNC_ARG                                            $44
         58        DO_FCALL                                      0  $45     
         59        ASSIGN                                                   !5, $45
   46    60        INIT_FCALL_BY_NAME                                       'test_input'
         61        CHECK_FUNC_ARG                                           
         62        FETCH_FUNC_ARG               global              $47     '_POST'
         63        FETCH_DIM_FUNC_ARG                               $48     $47, 'password'
         64        SEND_FUNC_ARG                                            $48
         65        DO_FCALL                                      0  $49     
         66        ADD                                              ~50     !6, $49
         67        FREE                                                     ~50
   47    68        INIT_FCALL_BY_NAME                                       'test_input'
         69        CHECK_FUNC_ARG                                           
         70        FETCH_FUNC_ARG               global              $51     '_POST'
         71        FETCH_DIM_FUNC_ARG                               $52     $51, 'sex'
         72        SEND_FUNC_ARG                                            $52
         73        DO_FCALL                                      0  $53     
         74        ASSIGN                                                   !7, $53
   48    75        INIT_FCALL_BY_NAME                                       'test_input'
         76        CHECK_FUNC_ARG                                           
         77        FETCH_FUNC_ARG               global              $55     '_POST'
         78        FETCH_DIM_FUNC_ARG                               $56     $55, 'comment'
         79        SEND_FUNC_ARG                                            $56
         80        DO_FCALL                                      0  $57     
         81        ASSIGN                                                   !8, $57
   57    82    >   ECHO                                                     '%09%09%09%09%09%09%09%09%3C%2Fhtml%3E'
         83      > RETURN                                                   1

Function test_input:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GDr03
function name:  test_input
number of ops:  15
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E >   RECV                                             !0      
   51     1        INIT_FCALL                                               'trim'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   52     5        INIT_FCALL_BY_NAME                                       'striplash'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $3      
          8        ASSIGN                                                   !0, $3
   53     9        INIT_FCALL                                               'htmlspecialchars'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !0, $5
   54    13      > RETURN                                                   !0
   55    14*     > RETURN                                                   null

End of function test_input

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
270.33 ms | 1404 KiB | 18 Q