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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.48 ms | 1396 KiB | 15 Q