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->connect(); } public function __sleep() { return array('server', 'username', 'password', 'db'); } public function __wakeup() { $this->connect(); } public function stampa() { echo _wakeup(); } } $conect= new Connection(); $conect->stampa(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7XT6
function name:  (null)
number of ops:  6
compiled vars:  !0 = $conect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $1      'Connection'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   34     3        INIT_METHOD_CALL                                         !0, 'stampa'
          4        DO_FCALL                                      0          
   35     5      > RETURN                                                   1

Class Connection:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7XT6
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                                         'connect'
         13        DO_FCALL                                      0          
   14    14      > 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/o7XT6
function name:  __sleep
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E > > RETURN                                                   <array>
   21     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/o7XT6
function name:  __wakeup
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_METHOD_CALL                                         'connect'
          1        DO_FCALL                                      0          
   26     2      > RETURN                                                   null

End of function __wakeup

Function stampa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7XT6
function name:  stampa
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_FCALL_BY_NAME                                       '_wakeup'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   30     3      > RETURN                                                   null

End of function stampa

End of class Connection.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.93 ms | 1399 KiB | 13 Q