3v4l.org

run code in 500+ PHP versions simultaneously
<!DOCTYPE html> <html> <head> <title>E-permanence</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control " content="no-cache"> <style> label { display:block; margin: 20px 0 5px 0; } </style> </head> <body> <h1>Inscription</h1> <form name="form" method="post" action="$$valeurs.php"> <label for="nom">Nom*</label> <input name="nom" type="text" id="nom" maxlength="20"> <label for="prenom">Prenom*</label> <input name="prenom" type="text" id="prenom" maxlength="20"> <label for="mail">Mail*</label> <input name="mail" type="email" id="mail" maxlength="20"> <label for="sexe">Votre sexe</label> <input name="sexe" type="text" id="sexe"> <label for="profession">Votre profession</label> <input name="profession" type="text" id="profession"> <p><input type="submit" value="go"></p> </form> </body> </html> <?php // si qqch est posté ($_POST = tableau) if(isset($_POST)) { // pour chaque valeur du tableau foreach ($_POST as $key => $post) { // transforme la clé (form name) en variable et attribue lui sa valeur correspondante ${$key} = strip_tags(trim($post)); } } /* $nom = ''; $prenom = ''; $mail = ''; $sexe = ''; $profession = ''; */ $tab = array('nom', 'prenom', 'mail', 'sexe', 'profession'); foreach($tab as $value) { if (!isset(${$value})) { ${$value} = ''; // die(var_dump($value)); } } if(empty($nom) || empty($prenom) || empty($mail)) { ?> <html> <head> <title>Avertissement</title> </head> <body> <?php // header("Location:e-perm_homepprofession.php?inscription=no&prob=1"); ?> <h1>Erreur</h1> <p style="font-weight:bold; color:#990000;">Veuillez remplir tous les champs requis</p> <p><a href="e-perm_register.php">Retour</a></p> </body> </html> <?php } else { var_dump($nom); var_dump($prenom); var_dump($mail); var_dump($sexe); var_dump($profession); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 23
Branch analysis from position: 24
2 jumps found. (Code = 47) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
2 jumps found. (Code = 47) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 36
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 29
Branch analysis from position: 24
Branch analysis from position: 14
Branch analysis from position: 15
filename:       /in/a6aI5
function name:  (null)
number of ops:  52
compiled vars:  !0 = $post, !1 = $key, !2 = $tab, !3 = $value, !4 = $nom, !5 = $prenom, !6 = $mail, !7 = $sexe, !8 = $profession
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                         '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Chead%3E%0A++++%3Ctitle%3EE-permanence%3C%2Ftitle%3E%0A++++%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3Dutf-8%22%3E%0A++++%3Cmeta+http-equiv%3D%22Pragma%22+content%3D%22no-cache%22%3E%0A++++%3Cmeta+http-equiv%3D%22Cache-Control+%22+content%3D%22no-cache%22%3E%0A%0A%09%3Cstyle%3E%0A%09label+%7B%0A%09%09display%3Ablock%3B%0A%09%09margin%3A+20px+0+5px+0%3B%0A%09%7D%0A%09%3C%2Fstyle%3E%0A%3C%2Fhead%3E%0A%0A%3Cbody%3E%0A%0A++++%3Ch1%3EInscription%3C%2Fh1%3E%0A%0A++++%3Cform+name%3D%22form%22+method%3D%22post%22+action%3D%22%24%24valeurs.php%22%3E%0A%0A++++%3Clabel+for%3D%22nom%22%3ENom%2A%3C%2Flabel%3E%0A++++%3Cinput+name%3D%22nom%22+type%3D%22text%22+id%3D%22nom%22+maxlength%3D%2220%22%3E%0A%0A++++%3Clabel+for%3D%22prenom%22%3EPrenom%2A%3C%2Flabel%3E%0A++++%3Cinput+name%3D%22prenom%22+type%3D%22text%22+id%3D%22prenom%22+maxlength%3D%2220%22%3E%0A%0A++++%3Clabel+for%3D%22mail%22%3EMail%2A%3C%2Flabel%3E%0A++++%3Cinput+name%3D%22mail%22+type%3D%22email%22+id%3D%22mail%22+maxlength%3D%2220%22%3E%0A%0A%0A++++%3Clabel+for%3D%22sexe%22%3EVotre+sexe%3C%2Flabel%3E%0A++++%3Cinput+name%3D%22sexe%22+type%3D%22text%22+id%3D%22sexe%22%3E%0A%09%0A++++%3Clabel+for%3D%22profession%22%3EVotre+profession%3C%2Flabel%3E%0A++++%3Cinput+name%3D%22profession%22+type%3D%22text%22+id%3D%22profession%22%3E%0A%09%0A%09%3Cp%3E%3Cinput+type%3D%22submit%22+value%3D%22go%22%3E%3C%2Fp%3E%0A%0A%3C%2Fform%3E%0A%0A%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A%0A%0A%0A'
   52     1        ISSET_ISEMPTY_VAR                                 2          '_POST'
          2      > JMPZ                                                         ~9, ->15
   54     3    >   FETCH_R                          global              ~10     '_POST'
          4      > FE_RESET_R                                           $11     ~10, ->14
          5    > > FE_FETCH_R                                           ~12     $11, !0, ->14
          6    >   ASSIGN                                                       !1, ~12
   56     7        INIT_FCALL                                                   'strip_tags'
          8        FRAMELESS_ICALL_1                trim                ~15     !0
          9        SEND_VAL                                                     ~15
         10        DO_ICALL                                             $16     
         11        FETCH_W                          local               $14     !1
         12        ASSIGN                                                       $14, $16
   54    13      > JMP                                                          ->5
         14    >   FE_FREE                                                      $11
   68    15    >   ASSIGN                                                       !2, <array>
   69    16      > FE_RESET_R                                           $19     !2, ->24
         17    > > FE_FETCH_R                                                   $19, !3, ->24
   70    18    >   ISSET_ISEMPTY_VAR                                 4  ~20     !3
         19        BOOL_NOT                                             ~21     ~20
         20      > JMPZ                                                         ~21, ->23
   71    21    >   FETCH_W                          local               $22     !3
         22        ASSIGN                                                       $22, ''
   69    23    > > JMP                                                          ->17
         24    >   FE_FREE                                                      $19
   77    25        ISSET_ISEMPTY_CV                                     ~24     !4
         26      > JMPNZ_EX                                             ~24     ~24, ->29
         27    >   ISSET_ISEMPTY_CV                                     ~25     !5
         28        BOOL                                                 ~24     ~25
         29    > > JMPNZ_EX                                             ~24     ~24, ->32
         30    >   ISSET_ISEMPTY_CV                                     ~26     !6
         31        BOOL                                                 ~24     ~26
         32    > > JMPZ                                                         ~24, ->36
   78    33    >   ECHO                                                         '++++%3Chtml%3E%0A++++%3Chead%3E%0A++++++++%3Ctitle%3EAvertissement%3C%2Ftitle%3E%0A++++%3C%2Fhead%3E%0A++++%3Cbody%3E%0A++++++++'
   84    34        ECHO                                                         '++++++++%3Ch1%3EErreur%3C%2Fh1%3E%0A++++++++%3Cp+style%3D%22font-weight%3Abold%3B+color%3A%23990000%3B%22%3EVeuillez+remplir+tous+les+champs+requis%3C%2Fp%3E%0A++++++++%3Cp%3E%3Ca+href%3D%22e-perm_register.php%22%3ERetour%3C%2Fa%3E%3C%2Fp%3E%0A++++%3C%2Fbody%3E%0A++++%3C%2Fhtml%3E%0A%0A++++'
   77    35      > JMP                                                          ->51
   94    36    >   INIT_FCALL                                                   'var_dump'
         37        SEND_VAR                                                     !4
         38        DO_ICALL                                                     
   95    39        INIT_FCALL                                                   'var_dump'
         40        SEND_VAR                                                     !5
         41        DO_ICALL                                                     
   96    42        INIT_FCALL                                                   'var_dump'
         43        SEND_VAR                                                     !6
         44        DO_ICALL                                                     
   97    45        INIT_FCALL                                                   'var_dump'
         46        SEND_VAR                                                     !7
         47        DO_ICALL                                                     
   98    48        INIT_FCALL                                                   'var_dump'
         49        SEND_VAR                                                     !8
         50        DO_ICALL                                                     
  102    51    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
171.34 ms | 3254 KiB | 15 Q