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 (?, ?, ?)"); $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); if ($editFlag != "1"){ $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $stmt . "<br>" . $link->error; } } else { $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $stmt . "<br>" . $link->error; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 50
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 44
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 76
Branch analysis from position: 76
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 76
Branch analysis from position: 76
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 70, Position 2 = 71
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 76
Branch analysis from position: 76
Branch analysis from position: 71
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iO73e
function name:  (null)
number of ops:  77
compiled vars:  !0 = $editFlag, !1 = $section, !2 = $stmt, !3 = $link, !4 = $config, !5 = $purifier, !6 = $clean_html
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                                         ~9      '_POST'
          4        FETCH_DIM_IS                                     ~10     ~9, 'editFlag'
          5        COALESCE                                         ~11     ~10
          6        QM_ASSIGN                                        ~11     <false>
          7        ASSIGN                                                   !0, ~11
    6     8        ASSIGN                                                   !1, 1
    7     9        INCLUDE_OR_EVAL                                          'tools%2FHTMLPurifier.standalone.php', REQUIRE_ONCE
    8    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  $15     
         13        ASSIGN                                                   !2, $15
    9    14        INIT_STATIC_METHOD_CALL                                  'HTMLPurifier_Config', 'createDefault'
         15        DO_FCALL                                      0  $17     
         16        ASSIGN                                                   !4, $17
   10    17        NEW                                              $19     'HTMLPurifier'
         18        SEND_VAR_EX                                              !4
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !5, $19
   12    21        IS_NOT_EQUAL                                             !0, '1'
         22      > JMPZ                                                     ~22, ->50
   13    23    >   INIT_METHOD_CALL                                         !5, 'purify'
         24        CHECK_FUNC_ARG                                           
         25        FETCH_FUNC_ARG               global              $23     '_POST'
         26        FETCH_DIM_FUNC_ARG                               $24     $23, 'userContent'
         27        SEND_FUNC_ARG                                            $24
         28        DO_FCALL                                      0  $25     
         29        ASSIGN                                                   !6, $25
   14    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              $27     '_SESSION'
         35        FETCH_DIM_FUNC_ARG                               $28     $27, 'userID'
         36        SEND_FUNC_ARG                                            $28
         37        SEND_VAR_EX                                              !6
         38        DO_FCALL                                      0          
   15    39        INIT_METHOD_CALL                                         !2, 'execute'
         40        DO_FCALL                                      0  $30     
         41        TYPE_CHECK                                    8          $30
         42      > JMPZ                                                     ~31, ->44
         43    > > JMP                                                      ->49
   18    44    >   CONCAT                                           ~32     'Error%3A+', !2
         45        CONCAT                                           ~33     ~32, '%3Cbr%3E'
         46        FETCH_OBJ_R                                      ~34     !3, 'error'
         47        CONCAT                                           ~35     ~33, ~34
         48        ECHO                                                     ~35
         49    > > JMP                                                      ->76
   22    50    >   INIT_METHOD_CALL                                         !5, 'purify'
         51        CHECK_FUNC_ARG                                           
         52        FETCH_FUNC_ARG               global              $36     '_POST'
         53        FETCH_DIM_FUNC_ARG                               $37     $36, 'userContent'
         54        SEND_FUNC_ARG                                            $37
         55        DO_FCALL                                      0  $38     
         56        ASSIGN                                                   !6, $38
   23    57        INIT_METHOD_CALL                                         !2, 'bind_param'
         58        SEND_VAL_EX                                              'iis'
         59        SEND_VAR_EX                                              !1
         60        CHECK_FUNC_ARG                                           
         61        FETCH_FUNC_ARG               global              $40     '_SESSION'
         62        FETCH_DIM_FUNC_ARG                               $41     $40, 'userID'
         63        SEND_FUNC_ARG                                            $41
         64        SEND_VAR_EX                                              !6
         65        DO_FCALL                                      0          
   25    66        INIT_METHOD_CALL                                         !2, 'execute'
         67        DO_FCALL                                      0  $43     
         68        TYPE_CHECK                                    8          $43
         69      > JMPZ                                                     ~44, ->71
         70    > > JMP                                                      ->76
   28    71    >   CONCAT                                           ~45     'Error%3A+', !2
         72        CONCAT                                           ~46     ~45, '%3Cbr%3E'
         73        FETCH_OBJ_R                                      ~47     !3, 'error'
         74        CONCAT                                           ~48     ~46, ~47
         75        ECHO                                                     ~48
   34    76    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.53 ms | 1400 KiB | 15 Q