3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Authenticator { protected $isloggedin; protected $session; public function __construct(Session $session) { $this->session = $session; if ( ! empty($session->get('isloggedin')) && $session->get('isloggedin') == true) { //$isl = $session->get('isloggedin'); //if ( ! empty($isl) && $isl == true) { $this->isloggedin = true; } } } class BasicSession { protected $session = array(); public function get($key) { if (isset($this->session[$key])) { return $this->session[$key]; } return false; } } try { $sess = new BasicSession(); $auth = new Authenticator($sess); } catch (Exception $e) { die('System go KA-BOOM! ' . $e->getMessage()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/WOr3V
function name:  (null)
number of ops:  14
compiled vars:  !0 = $sess, !1 = $auth, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   NEW                                              $3      'BasicSession'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   31     3        NEW                                              $6      'Authenticator'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
          7      > JMP                                                      ->13
   32     8  E > > CATCH                                       last         'Exception'
   33     9    >   INIT_METHOD_CALL                                         !2, 'getMessage'
         10        DO_FCALL                                      0  $9      
         11        CONCAT                                           ~10     'System+go+KA-BOOM%21+', $9
         12      > EXIT                                                     ~10
   34    13    > > RETURN                                                   1

Class Authenticator:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 14
filename:       /in/WOr3V
function name:  __construct
number of ops:  18
compiled vars:  !0 = $session
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'session'
          2        OP_DATA                                                  !0
   10     3        INIT_METHOD_CALL                                         !0, 'get'
          4        SEND_VAL_EX                                              'isloggedin'
          5        DO_FCALL                                      0  $2      
          6        BOOL_NOT                                         ~3      $2
          7        BOOL_NOT                                         ~4      ~3
          8      > JMPZ_EX                                          ~4      ~4, ->14
          9    >   INIT_METHOD_CALL                                         !0, 'get'
         10        SEND_VAL_EX                                              'isloggedin'
         11        DO_FCALL                                      0  $5      
         12        BOOL                                             ~6      $5
         13        BOOL                                             ~4      ~6
         14    > > JMPZ                                                     ~4, ->17
   13    15    >   ASSIGN_OBJ                                               'isloggedin'
         16        OP_DATA                                                  <true>
   15    17    > > RETURN                                                   null

End of function __construct

End of class Authenticator.

Class BasicSession:
Function get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WOr3V
function name:  get
number of ops:  9
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   22     1        FETCH_OBJ_IS                                     ~1      'session'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->7
   23     4    >   FETCH_OBJ_R                                      ~3      'session'
          5        FETCH_DIM_R                                      ~4      ~3, !0
          6      > RETURN                                                   ~4
   25     7    > > RETURN                                                   <false>
   26     8*     > RETURN                                                   null

End of function get

End of class BasicSession.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.39 ms | 1399 KiB | 13 Q