3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function loginUserByID($userID) { $user = $this->db->getPerson($userID); if(!$user) { return false; } if ($user["activated"] == 0){ return false; } $_SESSION["user"] = $user; $_SESSION["loginKey"] = $this->getLoginKey(); return true; }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/lJWPt
function name:  (null)
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
  13     1      > RETURN                                                   1

Function loginuserbyid:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
Jump found. Position 1 = -2
Branch analysis from position: 9
Jump found. Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
Jump found. Position 1 = -2
Branch analysis from position: 13
Jump found. Position 1 = -2
filename:       /in/lJWPt
function name:  loginUserByID
number of ops:  23
compiled vars:  !0 = $userID, !1 = $user
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   RECV                                             !0      
   3     1        FETCH_OBJ_R                                      $2      'db'
         2        INIT_METHOD_CALL                                         $2, 'getPerson'
         3        SEND_VAR_EX                                              !0
         4        DO_FCALL                                      0  $3      
         5        ASSIGN                                                   !1, $3
   4     6        BOOL_NOT                                         ~5      !1
         7      > JMPZ                                                     ~5, ->9
   5     8    > > RETURN                                                   <false>
   7     9    >   FETCH_DIM_R                                      $6      !1, 'activated'
        10        IS_EQUAL                                         ~7      $6, 0
        11      > JMPZ                                                     ~7, ->13
   8    12    > > RETURN                                                   <false>
  10    13    >   FETCH_W                      global              $8      '_SESSION'
        14        ASSIGN_DIM                                               $8, 'user'
        15        OP_DATA                                                  !1
  11    16        INIT_METHOD_CALL                                         'getLoginKey'
        17        DO_FCALL                                      0  $12     
        18        FETCH_W                      global              $10     '_SESSION'
        19        ASSIGN_DIM                                               $10, 'loginKey'
        20        OP_DATA                                                  $12
  12    21      > RETURN                                                   <true>
  13    22*     > RETURN                                                   null

End of function loginuserbyid

Generated using Vulcan Logic Dumper, using php 7.2.0