3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); include('mysql.php'); $editFlag = $_POST['editFlag'] ?? false; $section = 1; require_once 'tools/HTMLPurifier.standalone.php'; $stmt = $link->prepare("INSERT INTO userContent (section, author, content) VALUES (?, ?, ?)"); if ($editFlag != "1"){ $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { echo '<center>Your content was added.</center>'; } else { echo "Error: " . $sql . "<br>" . $link->error; } } else { $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $sql . "<br>" . $link->error; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 51
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 78, Position 2 = 79
Branch analysis from position: 78
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
Branch analysis from position: 79
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mudap
function name:  (null)
number of ops:  85
compiled vars:  !0 = $editFlag, !1 = $section, !2 = $stmt, !3 = $link, !4 = $config, !5 = $purifier, !6 = $clean_html, !7 = $sql
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
    4     2        INCLUDE_OR_EVAL                                          'mysql.php', INCLUDE
    5     3        FETCH_IS                                         ~10     '_POST'
          4        FETCH_DIM_IS                                     ~11     ~10, 'editFlag'
          5        COALESCE                                         ~12     ~11
          6        QM_ASSIGN                                        ~12     <false>
          7        ASSIGN                                                   !0, ~12
    6     8        ASSIGN                                                   !1, 1
    9     9        INCLUDE_OR_EVAL                                          'tools%2FHTMLPurifier.standalone.php', REQUIRE_ONCE
   10    10        INIT_METHOD_CALL                                         !3, 'prepare'
         11        SEND_VAL_EX                                              'INSERT+INTO+userContent+%28section%2C+author%2C+content%29+VALUES+%28%3F%2C+%3F%2C+%3F%29'
         12        DO_FCALL                                      0  $16     
         13        ASSIGN                                                   !2, $16
   12    14        IS_NOT_EQUAL                                             !0, '1'
         15      > JMPZ                                                     ~18, ->51
   14    16    >   INIT_STATIC_METHOD_CALL                                  'HTMLPurifier_Config', 'createDefault'
         17        DO_FCALL                                      0  $19     
         18        ASSIGN                                                   !4, $19
   15    19        NEW                                              $21     'HTMLPurifier'
         20        SEND_VAR_EX                                              !4
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !5, $21
   16    23        INIT_METHOD_CALL                                         !5, 'purify'
         24        CHECK_FUNC_ARG                                           
         25        FETCH_FUNC_ARG               global              $24     '_POST'
         26        FETCH_DIM_FUNC_ARG                               $25     $24, 'userContent'
         27        SEND_FUNC_ARG                                            $25
         28        DO_FCALL                                      0  $26     
         29        ASSIGN                                                   !6, $26
   17    30        INIT_METHOD_CALL                                         !2, 'bind_param'
         31        SEND_VAL_EX                                              'iis'
         32        SEND_VAR_EX                                              !1
         33        CHECK_FUNC_ARG                                           
         34        FETCH_FUNC_ARG               global              $28     '_SESSION'
         35        FETCH_DIM_FUNC_ARG                               $29     $28, 'userID'
         36        SEND_FUNC_ARG                                            $29
         37        SEND_VAR_EX                                              !6
         38        DO_FCALL                                      0          
   19    39        INIT_METHOD_CALL                                         !2, 'execute'
         40        DO_FCALL                                      0  $31     
         41        TYPE_CHECK                                    8          $31
         42      > JMPZ                                                     ~32, ->45
   21    43    >   ECHO                                                     '%3Ccenter%3EYour+content+was+added.%3C%2Fcenter%3E'
   19    44      > JMP                                                      ->50
   25    45    >   CONCAT                                           ~33     'Error%3A+', !7
         46        CONCAT                                           ~34     ~33, '%3Cbr%3E'
         47        FETCH_OBJ_R                                      ~35     !3, 'error'
         48        CONCAT                                           ~36     ~34, ~35
         49        ECHO                                                     ~36
   12    50    > > JMP                                                      ->84
   29    51    >   INIT_STATIC_METHOD_CALL                                  'HTMLPurifier_Config', 'createDefault'
         52        DO_FCALL                                      0  $37     
         53        ASSIGN                                                   !4, $37
   30    54        NEW                                              $39     'HTMLPurifier'
         55        SEND_VAR_EX                                              !4
         56        DO_FCALL                                      0          
         57        ASSIGN                                                   !5, $39
   31    58        INIT_METHOD_CALL                                         !5, 'purify'
         59        CHECK_FUNC_ARG                                           
         60        FETCH_FUNC_ARG               global              $42     '_POST'
         61        FETCH_DIM_FUNC_ARG                               $43     $42, 'userContent'
         62        SEND_FUNC_ARG                                            $43
         63        DO_FCALL                                      0  $44     
         64        ASSIGN                                                   !6, $44
   32    65        INIT_METHOD_CALL                                         !2, 'bind_param'
         66        SEND_VAL_EX                                              'iis'
         67        SEND_VAR_EX                                              !1
         68        CHECK_FUNC_ARG                                           
         69        FETCH_FUNC_ARG               global              $46     '_SESSION'
         70        FETCH_DIM_FUNC_ARG                               $47     $46, 'userID'
         71        SEND_FUNC_ARG                                            $47
         72        SEND_VAR_EX                                              !6
         73        DO_FCALL                                      0          
   34    74        INIT_METHOD_CALL                                         !2, 'execute'
         75        DO_FCALL                                      0  $49     
         76        TYPE_CHECK                                    8          $49
         77      > JMPZ                                                     ~50, ->79
         78    > > JMP                                                      ->84
   37    79    >   CONCAT                                           ~51     'Error%3A+', !7
         80        CONCAT                                           ~52     ~51, '%3Cbr%3E'
         81        FETCH_OBJ_R                                      ~53     !3, 'error'
         82        CONCAT                                           ~54     ~52, ~53
         83        ECHO                                                     ~54
   43    84    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.36 ms | 1460 KiB | 14 Q