3v4l.org

run code in 300+ PHP versions simultaneously
<?php function Login() { if(empty($_POST['username'])) { $this->HandleError("UserName is empty!"); return false; } if(empty($_POST['password'])) { $this->HandleError("Password is empty!"); return false; } $username = trim($_POST['username']); $password = trim($_POST['password']); if(!$this->CheckLoginInDB($username,$password)) { return false; } session_start(); $_SESSION[$this->GetLoginSessionVar()] = $username; return true; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ml4lU
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E > > RETURN                                                   1

Function login:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ml4lU
function name:  Login
number of ops:  46
compiled vars:  !0 = $username, !1 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_IS                                         ~2      '_POST'
          1        ISSET_ISEMPTY_DIM_OBJ                         1          ~2, 'username'
          2      > JMPZ                                                     ~3, ->8
    6     3    >   FETCH_THIS                                       $4      
          4        INIT_METHOD_CALL                                         $4, 'HandleError'
          5        SEND_VAL_EX                                              'UserName+is+empty%21'
          6        DO_FCALL                                      0          
    7     7      > RETURN                                                   <false>
   10     8    >   FETCH_IS                                         ~6      '_POST'
          9        ISSET_ISEMPTY_DIM_OBJ                         1          ~6, 'password'
         10      > JMPZ                                                     ~7, ->16
   12    11    >   FETCH_THIS                                       $8      
         12        INIT_METHOD_CALL                                         $8, 'HandleError'
         13        SEND_VAL_EX                                              'Password+is+empty%21'
         14        DO_FCALL                                      0          
   13    15      > RETURN                                                   <false>
   16    16    >   INIT_FCALL                                               'trim'
         17        FETCH_R                      global              ~10     '_POST'
         18        FETCH_DIM_R                                      ~11     ~10, 'username'
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !0, $12
   17    22        INIT_FCALL                                               'trim'
         23        FETCH_R                      global              ~14     '_POST'
         24        FETCH_DIM_R                                      ~15     ~14, 'password'
         25        SEND_VAL                                                 ~15
         26        DO_ICALL                                         $16     
         27        ASSIGN                                                   !1, $16
   19    28        FETCH_THIS                                       $18     
         29        INIT_METHOD_CALL                                         $18, 'CheckLoginInDB'
         30        SEND_VAR_EX                                              !0
         31        SEND_VAR_EX                                              !1
         32        DO_FCALL                                      0  $19     
         33        BOOL_NOT                                         ~20     $19
         34      > JMPZ                                                     ~20, ->36
   21    35    > > RETURN                                                   <false>
   24    36    >   INIT_FCALL                                               'session_start'
         37        DO_ICALL                                                 
   26    38        FETCH_THIS                                       $23     
         39        INIT_METHOD_CALL                                         $23, 'GetLoginSessionVar'
         40        DO_FCALL                                      0  $24     
         41        FETCH_W                      global              $22     '_SESSION'
         42        ASSIGN_DIM                                               $22, $24
         43        OP_DATA                                                  !0
   28    44      > RETURN                                                   <true>
   29    45*     > RETURN                                                   null

End of function login

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.31 ms | 1400 KiB | 17 Q