3v4l.org

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

Class Connection:
Function __sleep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EWSkH
function name:  __sleep
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   <array>
   12     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/EWSkH
function name:  a
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'server'
          1        ECHO                                                     ~0
   19     2        FETCH_OBJ_R                                      ~1      'username'
          3        ECHO                                                     ~1
   20     4        FETCH_OBJ_R                                      ~2      'password'
          5        ECHO                                                     ~2
   21     6        FETCH_OBJ_R                                      ~3      'db'
          7        ECHO                                                     ~3
   22     8      > RETURN                                                   null

End of function a

End of class Connection.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.47 ms | 1394 KiB | 13 Q