3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $publicProperty = array(); } class Bar extends Foo { public function __construct(Foo $foo) { $this->wrapped = $foo; unset($this->bar); } public function __get($name) { return $this->wrapped->$name; } } $bar = new Bar(new Foo()); $bar->publicProperty['example'] = 'Hello World!';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ic7M7
function name:  (null)
number of ops:  10
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Bar'
          1        NEW                                              $2      'Foo'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   24     6        FETCH_OBJ_W                                      $6      !0, 'publicProperty'
          7        ASSIGN_DIM                                               $6, 'example'
          8        OP_DATA                                                  'Hello+World%21'
          9      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ic7M7
function name:  __construct
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'wrapped'
          2        OP_DATA                                                  !0
   13     3        UNSET_OBJ                                                'bar'
   14     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/ic7M7
function name:  __get
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        FETCH_OBJ_R                                      ~1      'wrapped'
          2        FETCH_OBJ_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   19     4*     > RETURN                                                   null

End of function __get

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.39 ms | 1398 KiB | 13 Q