3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once('../inc/connect.php'); $pageTitle = 'Bericht plaatsen'; include(ROOT_DIR.'/header.php'); $append = ''; if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['secure']) && isset($_POST['ref']) && isset($_POST['email']) && isset($_POST['message']) && $_POST['token'] === $_SESSION['TICKET_FORM_TOKEN'] && isset($_POST['recaptcha_challenge_field']) && isset($_POST['recaptcha_response_field'])) { sleep(2); $_SESSION['TICKET_FORM_TOKEN'] = hash('sha256',mt_rand().time()); $resp = recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY,$_SERVER["REMOTE_ADDR"],$_POST["recaptcha_challenge_field"],$_POST["recaptcha_response_field"]); if($_POST['secure'] === hash('sha256',$_POST['ref'].$_POST['email'].SECRET_STRING)) { if($ticket = $_ticket->getTicket($_POST['ref'],$_POST['email'])) { if($resp->is_valid) { $status = explode('|',$_ticket->addAnwser($ticket['id'],$_POST['message'],0)); if($status[0] == 'OK') { $append = '<div class="alert alert-success">Uw bericht is succesvol toegevoegd.</div><a href="'.$setting['url'].'view-ticket?ref='.$ticket['ref'].'&email='.$ticket['email'].'" class="btn btn-block">Klik hier om terug te gaan</a>'; } else { $append = '<div class="alert alert-error">Uw bericht kon niet toegevoegd worden: '.$status[1].'</div><a href="javascript:;" onclick="history.go(-1)" class="btn btn-block">Klik hier om terug te gaan</a>'; } } else { $append = '<div class="alert alert-error">U heeft de veiligheidscode verkeerd ingevoerd.</div><a href="javascript:;" onclick="history.go(-1)" class="btn btn-block">Klik hier om terug te gaan</a>'; } } else { $append = '<div class="alert alert-error">Geen ticket gevonden</div><a href="javascript:;" onclick="history.go(-1)" class="btn btn-block">Klik hier om terug te gaan</a>'; } } else { $append = '<div class="alert alert-error">U bent niet gemachtigd om deze pagina te bekijken</div><a href="javascript:;" onclick="history.go(-1)" class="btn btn-block">Klik hier om terug te gaan</a>'; } } else { header('Location: '.$setting['url']); die(); } ?> <div class="row-fluid"> <div class="span4 offset4"> <h2>Bericht plaatsen</h2> <div class="well"> <?=$append;?> </div> </div> </div> <?php include(ROOT_DIR.'/footer.php'); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
2 jumps found. (Code = 46) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
2 jumps found. (Code = 46) Position 1 = 26, Position 2 = 32
Branch analysis from position: 26
2 jumps found. (Code = 46) Position 1 = 33, Position 2 = 36
Branch analysis from position: 33
2 jumps found. (Code = 46) Position 1 = 37, Position 2 = 40
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 142
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 88, Position 2 = 140
Branch analysis from position: 88
2 jumps found. (Code = 43) Position 1 = 100, Position 2 = 138
Branch analysis from position: 100
2 jumps found. (Code = 43) Position 1 = 102, Position 2 = 136
Branch analysis from position: 102
2 jumps found. (Code = 43) Position 1 = 120, Position 2 = 131
Branch analysis from position: 120
1 jumps found. (Code = 42) Position 1 = 135
Branch analysis from position: 135
1 jumps found. (Code = 42) Position 1 = 137
Branch analysis from position: 137
1 jumps found. (Code = 42) Position 1 = 139
Branch analysis from position: 139
1 jumps found. (Code = 42) Position 1 = 141
Branch analysis from position: 141
1 jumps found. (Code = 42) Position 1 = 148
Branch analysis from position: 148
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 131
1 jumps found. (Code = 42) Position 1 = 137
Branch analysis from position: 137
Branch analysis from position: 136
1 jumps found. (Code = 42) Position 1 = 139
Branch analysis from position: 139
Branch analysis from position: 138
1 jumps found. (Code = 42) Position 1 = 141
Branch analysis from position: 141
Branch analysis from position: 140
1 jumps found. (Code = 42) Position 1 = 148
Branch analysis from position: 148
Branch analysis from position: 142
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 36
Branch analysis from position: 32
Branch analysis from position: 25
Branch analysis from position: 21
Branch analysis from position: 17
Branch analysis from position: 13
filename:       /in/KUcfP
function name:  (null)
number of ops:  155
compiled vars:  !0 = $pageTitle, !1 = $append, !2 = $resp, !3 = $ticket, !4 = $_ticket, !5 = $status, !6 = $setting
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INCLUDE_OR_EVAL                                          '..%2Finc%2Fconnect.php', REQUIRE_ONCE
          1        ASSIGN                                                   !0, 'Bericht+plaatsen'
          2        FETCH_CONSTANT                                   ~9      'ROOT_DIR'
          3        CONCAT                                           ~10     ~9, '%2Fheader.php'
          4        INCLUDE_OR_EVAL                                          ~10, INCLUDE
    3     5        ASSIGN                                                   !1, ''
    5     6        FETCH_R                      global              ~13     '_SERVER'
          7        FETCH_DIM_R                                      ~14     ~13, 'REQUEST_METHOD'
          8        IS_EQUAL                                         ~15     ~14, 'POST'
          9      > JMPZ_EX                                          ~15     ~15, ->13
         10    >   FETCH_IS                                         ~16     '_POST'
         11        ISSET_ISEMPTY_DIM_OBJ                         0  ~17     ~16, 'secure'
         12        BOOL                                             ~15     ~17
         13    > > JMPZ_EX                                          ~15     ~15, ->17
         14    >   FETCH_IS                                         ~18     '_POST'
         15        ISSET_ISEMPTY_DIM_OBJ                         0  ~19     ~18, 'ref'
         16        BOOL                                             ~15     ~19
         17    > > JMPZ_EX                                          ~15     ~15, ->21
         18    >   FETCH_IS                                         ~20     '_POST'
         19        ISSET_ISEMPTY_DIM_OBJ                         0  ~21     ~20, 'email'
         20        BOOL                                             ~15     ~21
         21    > > JMPZ_EX                                          ~15     ~15, ->25
         22    >   FETCH_IS                                         ~22     '_POST'
         23        ISSET_ISEMPTY_DIM_OBJ                         0  ~23     ~22, 'message'
         24        BOOL                                             ~15     ~23
         25    > > JMPZ_EX                                          ~15     ~15, ->32
         26    >   FETCH_R                      global              ~24     '_POST'
         27        FETCH_DIM_R                                      ~25     ~24, 'token'
         28        FETCH_R                      global              ~26     '_SESSION'
         29        FETCH_DIM_R                                      ~27     ~26, 'TICKET_FORM_TOKEN'
         30        IS_IDENTICAL                                     ~28     ~25, ~27
         31        BOOL                                             ~15     ~28
         32    > > JMPZ_EX                                          ~15     ~15, ->36
         33    >   FETCH_IS                                         ~29     '_POST'
         34        ISSET_ISEMPTY_DIM_OBJ                         0  ~30     ~29, 'recaptcha_challenge_field'
         35        BOOL                                             ~15     ~30
         36    > > JMPZ_EX                                          ~15     ~15, ->40
         37    >   FETCH_IS                                         ~31     '_POST'
         38        ISSET_ISEMPTY_DIM_OBJ                         0  ~32     ~31, 'recaptcha_response_field'
         39        BOOL                                             ~15     ~32
         40    > > JMPZ                                                     ~15, ->142
    6    41    >   INIT_FCALL                                               'sleep'
         42        SEND_VAL                                                 2
         43        DO_ICALL                                                 
    8    44        INIT_FCALL                                               'hash'
         45        SEND_VAL                                                 'sha256'
         46        INIT_FCALL                                               'mt_rand'
         47        DO_ICALL                                         $36     
         48        INIT_FCALL                                               'time'
         49        DO_ICALL                                         $37     
         50        CONCAT                                           ~38     $36, $37
         51        SEND_VAL                                                 ~38
         52        DO_ICALL                                         $39     
         53        FETCH_W                      global              $34     '_SESSION'
         54        ASSIGN_DIM                                               $34, 'TICKET_FORM_TOKEN'
         55        OP_DATA                                                  $39
   10    56        INIT_FCALL_BY_NAME                                       'recaptcha_check_answer'
         57        FETCH_CONSTANT                                   ~40     'RECAPTCHA_PRIVATE_KEY'
         58        SEND_VAL_EX                                              ~40
         59        CHECK_FUNC_ARG                                           
         60        FETCH_FUNC_ARG               global              $41     '_SERVER'
         61        FETCH_DIM_FUNC_ARG                               $42     $41, 'REMOTE_ADDR'
         62        SEND_FUNC_ARG                                            $42
         63        CHECK_FUNC_ARG                                           
         64        FETCH_FUNC_ARG               global              $43     '_POST'
         65        FETCH_DIM_FUNC_ARG                               $44     $43, 'recaptcha_challenge_field'
         66        SEND_FUNC_ARG                                            $44
         67        CHECK_FUNC_ARG                                           
         68        FETCH_FUNC_ARG               global              $45     '_POST'
         69        FETCH_DIM_FUNC_ARG                               $46     $45, 'recaptcha_response_field'
         70        SEND_FUNC_ARG                                            $46
         71        DO_FCALL                                      0  $47     
         72        ASSIGN                                                   !2, $47
   12    73        FETCH_R                      global              ~49     '_POST'
         74        FETCH_DIM_R                                      ~50     ~49, 'secure'
         75        INIT_FCALL                                               'hash'
         76        SEND_VAL                                                 'sha256'
         77        FETCH_R                      global              ~51     '_POST'
         78        FETCH_DIM_R                                      ~52     ~51, 'ref'
         79        FETCH_R                      global              ~53     '_POST'
         80        FETCH_DIM_R                                      ~54     ~53, 'email'
         81        CONCAT                                           ~55     ~52, ~54
         82        FETCH_CONSTANT                                   ~56     'SECRET_STRING'
         83        CONCAT                                           ~57     ~55, ~56
         84        SEND_VAL                                                 ~57
         85        DO_ICALL                                         $58     
         86        IS_IDENTICAL                                             $58, ~50
         87      > JMPZ                                                     ~59, ->140
   13    88    >   INIT_METHOD_CALL                                         !4, 'getTicket'
         89        CHECK_FUNC_ARG                                           
         90        FETCH_FUNC_ARG               global              $60     '_POST'
         91        FETCH_DIM_FUNC_ARG                               $61     $60, 'ref'
         92        SEND_FUNC_ARG                                            $61
         93        CHECK_FUNC_ARG                                           
         94        FETCH_FUNC_ARG               global              $62     '_POST'
         95        FETCH_DIM_FUNC_ARG                               $63     $62, 'email'
         96        SEND_FUNC_ARG                                            $63
         97        DO_FCALL                                      0  $64     
         98        ASSIGN                                           ~65     !3, $64
         99      > JMPZ                                                     ~65, ->138
   14   100    >   FETCH_OBJ_R                                      ~66     !2, 'is_valid'
        101      > JMPZ                                                     ~66, ->136
   16   102    >   INIT_FCALL                                               'explode'
        103        SEND_VAL                                                 '%7C'
        104        INIT_METHOD_CALL                                         !4, 'addAnwser'
        105        CHECK_FUNC_ARG                                           
        106        FETCH_DIM_FUNC_ARG                               $67     !3, 'id'
        107        SEND_FUNC_ARG                                            $67
        108        CHECK_FUNC_ARG                                           
        109        FETCH_FUNC_ARG               global              $68     '_POST'
        110        FETCH_DIM_FUNC_ARG                               $69     $68, 'message'
        111        SEND_FUNC_ARG                                            $69
        112        SEND_VAL_EX                                              0
        113        DO_FCALL                                      0  $70     
        114        SEND_VAR                                                 $70
        115        DO_ICALL                                         $71     
        116        ASSIGN                                                   !5, $71
   17   117        FETCH_DIM_R                                      ~73     !5, 0
        118        IS_EQUAL                                                 ~73, 'OK'
        119      > JMPZ                                                     ~74, ->131
   18   120    >   FETCH_DIM_R                                      ~75     !6, 'url'
        121        CONCAT                                           ~76     '%3Cdiv+class%3D%22alert+alert-success%22%3EUw+bericht+is+succesvol+toegevoegd.%3C%2Fdiv%3E%3Ca+href%3D%22', ~75
        122        CONCAT                                           ~77     ~76, 'view-ticket%3Fref%3D'
        123        FETCH_DIM_R                                      ~78     !3, 'ref'
        124        CONCAT                                           ~79     ~77, ~78
        125        CONCAT                                           ~80     ~79, '%26email%3D'
        126        FETCH_DIM_R                                      ~81     !3, 'email'
        127        CONCAT                                           ~82     ~80, ~81
        128        CONCAT                                           ~83     ~82, '%22+class%3D%22btn+btn-block%22%3EKlik+hier+om+terug+te+gaan%3C%2Fa%3E'
        129        ASSIGN                                                   !1, ~83
        130      > JMP                                                      ->135
   20   131    >   FETCH_DIM_R                                      ~85     !5, 1
        132        CONCAT                                           ~86     '%3Cdiv+class%3D%22alert+alert-error%22%3EUw+bericht+kon+niet+toegevoegd+worden%3A+', ~85
        133        CONCAT                                           ~87     ~86, '%3C%2Fdiv%3E%3Ca+href%3D%22javascript%3A%3B%22+onclick%3D%22history.go%28-1%29%22+class%3D%22btn+btn-block%22%3EKlik+hier+om+terug+te+gaan%3C%2Fa%3E'
        134        ASSIGN                                                   !1, ~87
        135    > > JMP                                                      ->137
   24   136    >   ASSIGN                                                   !1, '%3Cdiv+class%3D%22alert+alert-error%22%3EU+heeft+de+veiligheidscode+verkeerd+ingevoerd.%3C%2Fdiv%3E%3Ca+href%3D%22javascript%3A%3B%22+onclick%3D%22history.go%28-1%29%22+class%3D%22btn+btn-block%22%3EKlik+hier+om+terug+te+gaan%3C%2Fa%3E'
        137    > > JMP                                                      ->139
   27   138    >   ASSIGN                                                   !1, '%3Cdiv+class%3D%22alert+alert-error%22%3EGeen+ticket+gevonden%3C%2Fdiv%3E%3Ca+href%3D%22javascript%3A%3B%22+onclick%3D%22history.go%28-1%29%22+class%3D%22btn+btn-block%22%3EKlik+hier+om+terug+te+gaan%3C%2Fa%3E'
        139    > > JMP                                                      ->141
   30   140    >   ASSIGN                                                   !1, '%3Cdiv+class%3D%22alert+alert-error%22%3EU+bent+niet+gemachtigd+om+deze+pagina+te+bekijken%3C%2Fdiv%3E%3Ca+href%3D%22javascript%3A%3B%22+onclick%3D%22history.go%28-1%29%22+class%3D%22btn+btn-block%22%3EKlik+hier+om+terug+te+gaan%3C%2Fa%3E'
        141    > > JMP                                                      ->148
   34   142    >   INIT_FCALL                                               'header'
        143        FETCH_DIM_R                                      ~92     !6, 'url'
        144        CONCAT                                           ~93     'Location%3A+', ~92
        145        SEND_VAL                                                 ~93
        146        DO_ICALL                                                 
   35   147      > EXIT                                                     
   38   148    >   ECHO                                                     '%0A%09%09%3Cdiv+class%3D%22row-fluid%22%3E%0A%09%09%0A%09%09%09%3Cdiv+class%3D%22span4+offset4%22%3E%0A%09%09%09%09%0A%09%09%09%09%3Ch2%3EBericht+plaatsen%3C%2Fh2%3E%0A%09%09%09%09%0A%09%09%09%09%3Cdiv+class%3D%22well%22%3E%0A%09%09%09%09%09'
   46   149        ECHO                                                     !1
   47   150        ECHO                                                     '%09%09%09%09%3C%2Fdiv%3E%0A%09%09%09%0A%09%09%09%3C%2Fdiv%3E%0A%0A%09%09%3C%2Fdiv%3E%0A%0A'
   53   151        FETCH_CONSTANT                                   ~95     'ROOT_DIR'
        152        CONCAT                                           ~96     ~95, '%2Ffooter.php'
        153        INCLUDE_OR_EVAL                                          ~96, INCLUDE
        154      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.62 ms | 1412 KiB | 25 Q