3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Connection { private $server, $username, $password, $db; public function __construct($server, $username, $password, $db) { $this->server = $server; $this->username = $username; $this->password = $password; $this->db = $db; } public function __sleep() { return array('server', 'username', 'password', 'db'); } public function a(){ var_dump( $server); echo $username; echo $password; echo $db; } } $conect= new Connection('server1', 'username1', 'password1', 'db1'); $connect->a('server', 'username', 'password', 'db'); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pVd8j
function name:  (null)
number of ops:  14
compiled vars:  !0 = $conect, !1 = $connect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   NEW                                              $2      'Connection'
          1        SEND_VAL_EX                                              'server1'
          2        SEND_VAL_EX                                              'username1'
          3        SEND_VAL_EX                                              'password1'
          4        SEND_VAL_EX                                              'db1'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   35     7        INIT_METHOD_CALL                                         !1, 'a'
          8        SEND_VAL_EX                                              'server'
          9        SEND_VAL_EX                                              'username'
         10        SEND_VAL_EX                                              'password'
         11        SEND_VAL_EX                                              'db'
         12        DO_FCALL                                      0          
   36    13      > RETURN                                                   1

Class Connection:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pVd8j
function name:  __construct
number of ops:  13
compiled vars:  !0 = $server, !1 = $username, !2 = $password, !3 = $db
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    9     4        ASSIGN_OBJ                                               'server'
          5        OP_DATA                                                  !0
   10     6        ASSIGN_OBJ                                               'username'
          7        OP_DATA                                                  !1
   11     8        ASSIGN_OBJ                                               'password'
          9        OP_DATA                                                  !2
   12    10        ASSIGN_OBJ                                               'db'
         11        OP_DATA                                                  !3
   14    12      > RETURN                                                   null

End of function __construct

Function __sleep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pVd8j
function name:  __sleep
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E > > RETURN                                                   <array>
   22     1*     > RETURN                                                   null

End of function __sleep

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pVd8j
function name:  a
number of ops:  7
compiled vars:  !0 = $server, !1 = $username, !2 = $password, !3 = $db
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAR                                                 !0
          2        DO_ICALL                                                 
   28     3        ECHO                                                     !1
   29     4        ECHO                                                     !2
   30     5        ECHO                                                     !3
   31     6      > RETURN                                                   null

End of function a

End of class Connection.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.27 ms | 1392 KiB | 15 Q