3v4l.org

run code in 300+ 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 = 17
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 25
Branch analysis from position: 26
2 jumps found. (Code = 47) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
2 jumps found. (Code = 47) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 38
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Branch analysis from position: 31
Branch analysis from position: 26
Branch analysis from position: 16
Branch analysis from position: 17
filename:       /in/a6aI5
function name:  (null)
number of ops:  54
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, ->17
   54     3    >   FETCH_R                      global              ~10     '_POST'
          4      > FE_RESET_R                                       $11     ~10, ->16
          5    > > FE_FETCH_R                                       ~12     $11, !0, ->16
          6    >   ASSIGN                                                   !1, ~12
   56     7        INIT_FCALL                                               'strip_tags'
          8        INIT_FCALL                                               'trim'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $15     
         11        SEND_VAR                                                 $15
         12        DO_ICALL                                         $16     
         13        FETCH_W                      local               $14     !1
         14        ASSIGN                                                   $14, $16
   54    15      > JMP                                                      ->5
         16    >   FE_FREE                                                  $11
   68    17    >   ASSIGN                                                   !2, <array>
   69    18      > FE_RESET_R                                       $19     !2, ->26
         19    > > FE_FETCH_R                                               $19, !3, ->26
   70    20    >   ISSET_ISEMPTY_VAR                             4  ~20     !3
         21        BOOL_NOT                                         ~21     ~20
         22      > JMPZ                                                     ~21, ->25
   71    23    >   FETCH_W                      local               $22     !3
         24        ASSIGN                                                   $22, ''
   69    25    > > JMP                                                      ->19
         26    >   FE_FREE                                                  $19
   77    27        ISSET_ISEMPTY_CV                                 ~24     !4
         28      > JMPNZ_EX                                         ~24     ~24, ->31
         29    >   ISSET_ISEMPTY_CV                                 ~25     !5
         30        BOOL                                             ~24     ~25
         31    > > JMPNZ_EX                                         ~24     ~24, ->34
         32    >   ISSET_ISEMPTY_CV                                 ~26     !6
         33        BOOL                                             ~24     ~26
         34    > > JMPZ                                                     ~24, ->38
   78    35    >   ECHO                                                     '++++%3Chtml%3E%0A++++%3Chead%3E%0A++++++++%3Ctitle%3EAvertissement%3C%2Ftitle%3E%0A++++%3C%2Fhead%3E%0A++++%3Cbody%3E%0A++++++++'
   84    36        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    37      > JMP                                                      ->53
   94    38    >   INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !4
         40        DO_ICALL                                                 
   95    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !5
         43        DO_ICALL                                                 
   96    44        INIT_FCALL                                               'var_dump'
         45        SEND_VAR                                                 !6
         46        DO_ICALL                                                 
   97    47        INIT_FCALL                                               'var_dump'
         48        SEND_VAR                                                 !7
         49        DO_ICALL                                                 
   98    50        INIT_FCALL                                               'var_dump'
         51        SEND_VAR                                                 !8
         52        DO_ICALL                                                 
  102    53    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.86 ms | 1456 KiB | 16 Q