3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Users{ public $user; public $pass; function setUser($user){ $this->user = $user; } function setPass($pass){ $this->pass = $pass; } function getUser(){ return $this->user; } function getPass(){ return $this->pass; } } $user = new Users(); $user->setUser('Anderson'); $user->setPass('123456'); session_save_path(); session_id('obj'); session_start(); $_SESSION['users'][]=$user; print_r($_SESSION['users']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GCIOX
function name:  (null)
number of ops:  26
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Users'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'setUser'
          4        SEND_VAL_EX                                              'Anderson'
          5        DO_FCALL                                      0          
   25     6        INIT_METHOD_CALL                                         !0, 'setPass'
          7        SEND_VAL_EX                                              '123456'
          8        DO_FCALL                                      0          
   29     9        INIT_FCALL                                               'session_save_path'
         10        DO_ICALL                                                 
   30    11        INIT_FCALL                                               'session_id'
         12        SEND_VAL                                                 'obj'
         13        DO_ICALL                                                 
   31    14        INIT_FCALL                                               'session_start'
         15        DO_ICALL                                                 
   33    16        FETCH_W                      global              $9      '_SESSION'
         17        FETCH_DIM_W                                      $10     $9, 'users'
         18        ASSIGN_DIM                                               $10
         19        OP_DATA                                                  !0
   34    20        INIT_FCALL                                               'print_r'
         21        FETCH_R                      global              ~12     '_SESSION'
         22        FETCH_DIM_R                                      ~13     ~12, 'users'
         23        SEND_VAL                                                 ~13
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Class Users:
Function setuser:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GCIOX
function name:  setUser
number of ops:  4
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'user'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function setuser

Function setpass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GCIOX
function name:  setPass
number of ops:  4
compiled vars:  !0 = $pass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ASSIGN_OBJ                                               'pass'
          2        OP_DATA                                                  !0
   12     3      > RETURN                                                   null

End of function setpass

Function getuser:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GCIOX
function name:  getUser
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'user'
          1      > RETURN                                                   ~0
   16     2*     > RETURN                                                   null

End of function getuser

Function getpass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GCIOX
function name:  getPass
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                      ~0      'pass'
          1      > RETURN                                                   ~0
   20     2*     > RETURN                                                   null

End of function getpass

End of class Users.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.07 ms | 1400 KiB | 21 Q