3v4l.org

run code in 500+ PHP versions simultaneously
<?php if (!isset($_POST["password"])) { $target = htmlspecialchars($_SERVER['PHP_SELF'] ?? ""); $form = '<html><head><title>testing</title></head><body><form action="'.$target.'" method="post"><input type="password" name="password"></form></body></html>'; echo($form); } else { if ($_POST["password"] === "TestersAndDevs0nly") { session_start(); $_SESSION["logged"] = true; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/jlrdA
function name:  (null)
number of ops:  27
compiled vars:  !0 = $target, !1 = $form
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                             ~2      '_POST'
          1        ISSET_ISEMPTY_DIM_OBJ                             0  ~3      ~2, 'password'
          2        BOOL_NOT                                             ~4      ~3
          3      > JMPZ                                                         ~4, ->17
    3     4    >   INIT_FCALL                                                   'htmlspecialchars'
          5        FETCH_IS                                             ~5      '_SERVER'
          6        FETCH_DIM_IS                                         ~6      ~5, 'PHP_SELF'
          7        COALESCE                                             ~7      ~6
          8        QM_ASSIGN                                            ~7      ''
          9        SEND_VAL                                                     ~7
         10        DO_ICALL                                             $8      
         11        ASSIGN                                                       !0, $8
    4    12        CONCAT                                               ~10     '%3Chtml%3E%3Chead%3E%3Ctitle%3Etesting%3C%2Ftitle%3E%3C%2Fhead%3E%3Cbody%3E%3Cform+action%3D%22', !0
         13        CONCAT                                               ~11     ~10, '%22+method%3D%22post%22%3E%3Cinput+type%3D%22password%22+name%3D%22password%22%3E%3C%2Fform%3E%3C%2Fbody%3E%3C%2Fhtml%3E'
         14        ASSIGN                                                       !1, ~11
    5    15        ECHO                                                         !1
    2    16      > JMP                                                          ->26
    7    17    >   FETCH_R                          global              ~13     '_POST'
         18        FETCH_DIM_R                                          ~14     ~13, 'password'
         19        IS_IDENTICAL                                                 ~14, 'TestersAndDevs0nly'
         20      > JMPZ                                                         ~15, ->26
    8    21    >   INIT_FCALL                                                   'session_start'
         22        DO_ICALL                                                     
    9    23        FETCH_W                          global              $17     '_SESSION'
         24        ASSIGN_DIM                                                   $17, 'logged'
         25        OP_DATA                                                      <true>
   12    26    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.09 ms | 1241 KiB | 15 Q