3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (isset($_POST['submit']) && isset($_POST['titel']) && isset($_POST['trainer']) && isset($_POST['dauer']) && $_POST['titel'] != '' && $_POST['trainer'] != '' && (int)$_POST['dauer'] > 0) { try { $db = new MySQLi('localhost', 'root', '', 'php'); echo 'Verbindung offen.<br />'; $sql = 'INSERT INTO trainings (titel, trainer, dauer) VALUES (?, ?, ?)'; $kommando = $db->prepare($sql); $kommando->bind_param('ssi', $_POST['titel'], $_POST['trainer'], $dauer); $dauer = (int)$_POST['dauer']; $kommando->execute(); echo 'SQL geschickt. <br />'; echo $kommando->affected_rows . ' Zeilen betroffen. <br />'; $db->close(); echo 'Verbindung zu.<br />'; } catch (Exception $e) { echo 'Fehler: ' . htmlspecialchars($e->getMessage()); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 78
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 78
Branch analysis from position: 78
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 78
Branch analysis from position: 30
Branch analysis from position: 24
Branch analysis from position: 19
Branch analysis from position: 14
Branch analysis from position: 10
Branch analysis from position: 6
Found catch point at position: 70
Branch analysis from position: 70
2 jumps found. (Code = 107) Position 1 = 71, Position 2 = -2
Branch analysis from position: 71
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lh8io
function name:  (null)
number of ops:  79
compiled vars:  !0 = $db, !1 = $sql, !2 = $kommando, !3 = $dauer, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~5      '_POST'
          1        ISSET_ISEMPTY_DIM_OBJ                         0  ~6      ~5, 'submit'
          2      > JMPZ_EX                                          ~6      ~6, ->6
          3    >   FETCH_IS                                         ~7      '_POST'
          4        ISSET_ISEMPTY_DIM_OBJ                         0  ~8      ~7, 'titel'
          5        BOOL                                             ~6      ~8
          6    > > JMPZ_EX                                          ~6      ~6, ->10
          7    >   FETCH_IS                                         ~9      '_POST'
          8        ISSET_ISEMPTY_DIM_OBJ                         0  ~10     ~9, 'trainer'
          9        BOOL                                             ~6      ~10
         10    > > JMPZ_EX                                          ~6      ~6, ->14
    3    11    >   FETCH_IS                                         ~11     '_POST'
         12        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     ~11, 'dauer'
         13        BOOL                                             ~6      ~12
         14    > > JMPZ_EX                                          ~6      ~6, ->19
         15    >   FETCH_R                      global              ~13     '_POST'
         16        FETCH_DIM_R                                      ~14     ~13, 'titel'
         17        IS_NOT_EQUAL                                     ~15     ~14, ''
         18        BOOL                                             ~6      ~15
         19    > > JMPZ_EX                                          ~6      ~6, ->24
         20    >   FETCH_R                      global              ~16     '_POST'
         21        FETCH_DIM_R                                      ~17     ~16, 'trainer'
         22        IS_NOT_EQUAL                                     ~18     ~17, ''
         23        BOOL                                             ~6      ~18
         24    > > JMPZ_EX                                          ~6      ~6, ->30
    4    25    >   FETCH_R                      global              ~19     '_POST'
         26        FETCH_DIM_R                                      ~20     ~19, 'dauer'
         27        CAST                                          4  ~21     ~20
         28        IS_SMALLER                                       ~22     0, ~21
         29        BOOL                                             ~6      ~22
         30    > > JMPZ                                                     ~6, ->78
    6    31    >   NEW                                              $23     'MySQLi'
         32        SEND_VAL_EX                                              'localhost'
         33        SEND_VAL_EX                                              'root'
         34        SEND_VAL_EX                                              ''
         35        SEND_VAL_EX                                              'php'
         36        DO_FCALL                                      0          
         37        ASSIGN                                                   !0, $23
    7    38        ECHO                                                     'Verbindung+offen.%3Cbr+%2F%3E'
    8    39        ASSIGN                                                   !1, 'INSERT+INTO+trainings+%28titel%2C+trainer%2C+dauer%29+VALUES+%28%3F%2C+%3F%2C+%3F%29'
    9    40        INIT_METHOD_CALL                                         !0, 'prepare'
         41        SEND_VAR_EX                                              !1
         42        DO_FCALL                                      0  $27     
         43        ASSIGN                                                   !2, $27
   10    44        INIT_METHOD_CALL                                         !2, 'bind_param'
         45        SEND_VAL_EX                                              'ssi'
         46        CHECK_FUNC_ARG                                           
         47        FETCH_FUNC_ARG               global              $29     '_POST'
         48        FETCH_DIM_FUNC_ARG                               $30     $29, 'titel'
         49        SEND_FUNC_ARG                                            $30
         50        CHECK_FUNC_ARG                                           
         51        FETCH_FUNC_ARG               global              $31     '_POST'
         52        FETCH_DIM_FUNC_ARG                               $32     $31, 'trainer'
         53        SEND_FUNC_ARG                                            $32
         54        SEND_VAR_EX                                              !3
         55        DO_FCALL                                      0          
   11    56        FETCH_R                      global              ~34     '_POST'
         57        FETCH_DIM_R                                      ~35     ~34, 'dauer'
         58        CAST                                          4  ~36     ~35
         59        ASSIGN                                                   !3, ~36
   12    60        INIT_METHOD_CALL                                         !2, 'execute'
         61        DO_FCALL                                      0          
   13    62        ECHO                                                     'SQL+geschickt.+%3Cbr+%2F%3E'
   14    63        FETCH_OBJ_R                                      ~39     !2, 'affected_rows'
         64        CONCAT                                           ~40     ~39, '+Zeilen+betroffen.+%3Cbr+%2F%3E'
         65        ECHO                                                     ~40
   15    66        INIT_METHOD_CALL                                         !0, 'close'
         67        DO_FCALL                                      0          
   16    68        ECHO                                                     'Verbindung+zu.%3Cbr+%2F%3E'
         69      > JMP                                                      ->78
   17    70  E > > CATCH                                       last         'Exception'
   18    71    >   INIT_FCALL                                               'htmlspecialchars'
         72        INIT_METHOD_CALL                                         !4, 'getMessage'
         73        DO_FCALL                                      0  $42     
         74        SEND_VAR                                                 $42
         75        DO_ICALL                                         $43     
         76        CONCAT                                           ~44     'Fehler%3A+', $43
         77        ECHO                                                     ~44
   21    78    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.68 ms | 1396 KiB | 15 Q