3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST['submit'])){ $fn = $_POST['firstname']; $ln = $_POST['lastname']; $e = $_POST['email']; $pn = $_POST['phonenumber']; $ui = $_POST['username']; $p = $_POST['password']; if($fn && $ln && $e && $pn && $ui && $p) { $sql = "INSERT INTO employee_details (first_name, last_name, email, phonenumber, username, password) VALUES ('$fn', '$ln', '$e', '$pn', '$ui', '$p')"; $stmt = mysqli_prepare($dbc, $sql); mysqli_stmt_execute($stmt); $affected_rows = mysqli_stmt_affected_rows($stmt); if($affected_rows == 1){ $body = "Thank you for registering. To activate your account, please click on this link:<br />"; $body = "http://localhost/mbactivate.php?x=" . mail($_POST['email'], 'Registration Confirmation', $body, 'From: derekbanas@verizon.net'); echo '<br /><br /><h3>Thank you for registering! A confirmation email has been sent to your address. Please click on the link in that email in order to activate your account.</h3>'; mysql_close(); exit(); } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 75
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
2 jumps found. (Code = 46) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
2 jumps found. (Code = 46) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
2 jumps found. (Code = 46) Position 1 = 28, Position 2 = 29
Branch analysis from position: 28
2 jumps found. (Code = 46) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 75
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 75
Branch analysis from position: 60
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 75
Branch analysis from position: 31
Branch analysis from position: 29
Branch analysis from position: 27
Branch analysis from position: 25
Branch analysis from position: 23
Branch analysis from position: 75
filename:       /in/ud7ed
function name:  (null)
number of ops:  76
compiled vars:  !0 = $fn, !1 = $ln, !2 = $e, !3 = $pn, !4 = $ui, !5 = $p, !6 = $sql, !7 = $stmt, !8 = $dbc, !9 = $affected_rows, !10 = $body
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~11     '_POST'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~11, 'submit'
          2      > JMPZ                                                     ~12, ->75
    3     3    >   FETCH_R                      global              ~13     '_POST'
          4        FETCH_DIM_R                                      ~14     ~13, 'firstname'
          5        ASSIGN                                                   !0, ~14
    4     6        FETCH_R                      global              ~16     '_POST'
          7        FETCH_DIM_R                                      ~17     ~16, 'lastname'
          8        ASSIGN                                                   !1, ~17
    5     9        FETCH_R                      global              ~19     '_POST'
         10        FETCH_DIM_R                                      ~20     ~19, 'email'
         11        ASSIGN                                                   !2, ~20
    6    12        FETCH_R                      global              ~22     '_POST'
         13        FETCH_DIM_R                                      ~23     ~22, 'phonenumber'
         14        ASSIGN                                                   !3, ~23
    7    15        FETCH_R                      global              ~25     '_POST'
         16        FETCH_DIM_R                                      ~26     ~25, 'username'
         17        ASSIGN                                                   !4, ~26
    8    18        FETCH_R                      global              ~28     '_POST'
         19        FETCH_DIM_R                                      ~29     ~28, 'password'
         20        ASSIGN                                                   !5, ~29
    9    21      > JMPZ_EX                                          ~31     !0, ->23
         22    >   BOOL                                             ~31     !1
         23    > > JMPZ_EX                                          ~31     ~31, ->25
         24    >   BOOL                                             ~31     !2
         25    > > JMPZ_EX                                          ~31     ~31, ->27
         26    >   BOOL                                             ~31     !3
         27    > > JMPZ_EX                                          ~31     ~31, ->29
         28    >   BOOL                                             ~31     !4
         29    > > JMPZ_EX                                          ~31     ~31, ->31
         30    >   BOOL                                             ~31     !5
         31    > > JMPZ                                                     ~31, ->75
   10    32    >   ROPE_INIT                                    13  ~33     'INSERT+INTO+employee_details+%28first_name%2C+last_name%2C+email%2C+phonenumber%2C+username%2C+password%29+VALUES%0A%28%27'
   11    33        ROPE_ADD                                      1  ~33     ~33, !0
         34        ROPE_ADD                                      2  ~33     ~33, '%27%2C+%27'
         35        ROPE_ADD                                      3  ~33     ~33, !1
         36        ROPE_ADD                                      4  ~33     ~33, '%27%2C+%27'
         37        ROPE_ADD                                      5  ~33     ~33, !2
         38        ROPE_ADD                                      6  ~33     ~33, '%27%2C+%27'
         39        ROPE_ADD                                      7  ~33     ~33, !3
         40        ROPE_ADD                                      8  ~33     ~33, '%27%2C+%27'
         41        ROPE_ADD                                      9  ~33     ~33, !4
         42        ROPE_ADD                                     10  ~33     ~33, '%27%2C+%27'
         43        ROPE_ADD                                     11  ~33     ~33, !5
         44        ROPE_END                                     12  ~32     ~33, '%27%29'
   10    45        ASSIGN                                                   !6, ~32
   12    46        INIT_FCALL_BY_NAME                                       'mysqli_prepare'
         47        SEND_VAR_EX                                              !8
         48        SEND_VAR_EX                                              !6
         49        DO_FCALL                                      0  $41     
         50        ASSIGN                                                   !7, $41
   13    51        INIT_FCALL_BY_NAME                                       'mysqli_stmt_execute'
         52        SEND_VAR_EX                                              !7
         53        DO_FCALL                                      0          
   14    54        INIT_FCALL_BY_NAME                                       'mysqli_stmt_affected_rows'
         55        SEND_VAR_EX                                              !7
         56        DO_FCALL                                      0  $44     
         57        ASSIGN                                                   !9, $44
   15    58        IS_EQUAL                                                 !9, 1
         59      > JMPZ                                                     ~46, ->75
   16    60    >   ASSIGN                                                   !10, 'Thank+you+for+registering.+To+activate+your+account%2C+please+click+on+this+link%3A%3Cbr+%2F%3E'
   18    61        INIT_FCALL                                               'mail'
         62        FETCH_R                      global              ~48     '_POST'
         63        FETCH_DIM_R                                      ~49     ~48, 'email'
         64        SEND_VAL                                                 ~49
         65        SEND_VAL                                                 'Registration+Confirmation'
         66        SEND_VAR                                                 !10
         67        SEND_VAL                                                 'From%3A+derekbanas%40verizon.net'
         68        DO_ICALL                                         $50     
         69        CONCAT                                           ~51     'http%3A%2F%2Flocalhost%2Fmbactivate.php%3Fx%3D', $50
   17    70        ASSIGN                                                   !10, ~51
   19    71        ECHO                                                     '%3Cbr+%2F%3E%3Cbr+%2F%3E%3Ch3%3EThank+you+for+registering%21+%0AA+confirmation+email+has+been+sent+to+your+address.+Please+click+on+the+link+in+that+email+in+order+to+activate+your+account.%3C%2Fh3%3E'
   21    72        INIT_FCALL_BY_NAME                                       'mysql_close'
         73        DO_FCALL                                      0          
   22    74      > EXIT                                                     
   25    75    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.52 ms | 1409 KiB | 15 Q