3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Connection { protected $link; private $server, $username, $password, $db; public function __construct($server, $username, $password, $db) { $this->server = $server; $this->username = $username; $this->password = $password; $this->db = $db; $this->array(); } private function nect() { $this->link = array($this->server, $this->username, $this->password); mysql_select_db($this->db, $this->link); } public function __sleep() { return array('server', 'username', 'password', 'db'); } public function __wakeup() { $this->array(); } public function sta(){ echo $server; echo $username; echo $password; echo $db; } } $conect= new Connection('server1', 'username1', 'password1', 'db1'); $connect->sta(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0FhM1
function name:  (null)
number of ops:  10
compiled vars:  !0 = $conect, !1 = $connect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     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
   42     7        INIT_METHOD_CALL                                         !1, 'sta'
          8        DO_FCALL                                      0          
   43     9      > RETURN                                                   1

Class Connection:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0FhM1
function name:  __construct
number of ops:  15
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
   13    12        INIT_METHOD_CALL                                         'array'
         13        DO_FCALL                                      0          
   14    14      > RETURN                                                   null

End of function __construct

Function nect:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0FhM1
function name:  nect
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_OBJ_R                                      ~1      'server'
          1        INIT_ARRAY                                       ~2      ~1
          2        FETCH_OBJ_R                                      ~3      'username'
          3        ADD_ARRAY_ELEMENT                                ~2      ~3
          4        FETCH_OBJ_R                                      ~4      'password'
          5        ADD_ARRAY_ELEMENT                                ~2      ~4
          6        ASSIGN_OBJ                                               'link'
          7        OP_DATA                                                  ~2
   18     8        INIT_FCALL_BY_NAME                                       'mysql_select_db'
          9        CHECK_FUNC_ARG                                           
         10        FETCH_OBJ_FUNC_ARG                               $5      'db'
         11        SEND_FUNC_ARG                                            $5
         12        CHECK_FUNC_ARG                                           
         13        FETCH_OBJ_FUNC_ARG                               $6      'link'
         14        SEND_FUNC_ARG                                            $6
         15        DO_FCALL                                      0          
   19    16      > RETURN                                                   null

End of function nect

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

End of function __sleep

Function __wakeup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0FhM1
function name:  __wakeup
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   INIT_METHOD_CALL                                         'array'
          1        DO_FCALL                                      0          
   31     2      > RETURN                                                   null

End of function __wakeup

Function sta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0FhM1
function name:  sta
number of ops:  5
compiled vars:  !0 = $server, !1 = $username, !2 = $password, !3 = $db
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   ECHO                                                     !0
   35     1        ECHO                                                     !1
   36     2        ECHO                                                     !2
   37     3        ECHO                                                     !3
   38     4      > RETURN                                                   null

End of function sta

End of class Connection.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.51 ms | 1399 KiB | 13 Q