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($server, $username, $password, $db){ 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/UUque
function name:  (null)
number of ops:  14
compiled vars:  !0 = $server, !1 = $username, !2 = $password, !3 = $db, !4 = $conect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   ASSIGN                                                   !0, 'server1'
   25     1        ASSIGN                                                   !1, 'username1'
   26     2        ASSIGN                                                   !2, 'password1'
   27     3        ASSIGN                                                   !3, 'db1'
   28     4        NEW                                              $9      'Connection'
          5        SEND_VAL_EX                                              'server1'
          6        SEND_VAL_EX                                              'username1'
          7        SEND_VAL_EX                                              'password1'
          8        SEND_VAL_EX                                              'db1'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !4, $9
   29    11        INIT_METHOD_CALL                                         !4, 'a'
         12        DO_FCALL                                      0          
   30    13      > RETURN                                                   1

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

End of function a

End of class Connection.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.37 ms | 1386 KiB | 13 Q