3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $_secret = null; public function bar( $value ) { $this->_secret = $value; } } class Baz { private $_foo = null; public function __construct() { $this->_foo = new Foo(); } public function get() { return $this->_foo; } } $o = new Baz(); print_r( $o ); $o->get()->bar( 'name' ); print_r( $o );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q3jQd
function name:  (null)
number of ops:  15
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'Baz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_FCALL                                               'print_r'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   29     6        INIT_METHOD_CALL                                         !0, 'get'
          7        DO_FCALL                                      0  $5      
          8        INIT_METHOD_CALL                                         $5, 'bar'
          9        SEND_VAL_EX                                              'name'
         10        DO_FCALL                                      0          
   30    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q3jQd
function name:  bar
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               '_secret'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function bar

End of class Foo.

Class Baz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q3jQd
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               '_foo'
          3        OP_DATA                                                  $1
   19     4      > RETURN                                                   null

End of function __construct

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q3jQd
function name:  get
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   FETCH_OBJ_R                                      ~0      '_foo'
          1      > RETURN                                                   ~0
   23     2*     > RETURN                                                   null

End of function get

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.82 ms | 1396 KiB | 15 Q