3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'baz'; } class FooProxy extends Foo { private $wrapped; public function __construct(Foo $foo) { $this->wrapped = $foo; unset($this->bar); } public function & __get($name) { return $this->wrapped->$name; } public function __set($name, $value) { $this->wrapped->$name = $value; } public function __isset($name) { return isset($this->wrapped->$name); } public function __unset($name) { unset($this->wrapped->$name); } } $foo = new FooProxy(new Foo()); $foo->bar; $foo->bar = 'baz'; isset($foo->bar); unset($foo->bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGlU6
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   NEW                                              $1      'FooProxy'
          1        NEW                                              $2      'Foo'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   40     6        FETCH_OBJ_R                                      ~6      !0, 'bar'
          7        FREE                                                     ~6
   41     8        ASSIGN_OBJ                                               !0, 'bar'
          9        OP_DATA                                                  'baz'
   42    10        ISSET_ISEMPTY_PROP_OBJ                           ~8      !0, 'bar'
         11        FREE                                                     ~8
   43    12        UNSET_OBJ                                                !0, 'bar'
         13      > RETURN                                                   1

Class Foo: [no user functions]
Class FooProxy:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGlU6
function name:  __construct
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        ASSIGN_OBJ                                               'wrapped'
          2        OP_DATA                                                  !0
   14     3        UNSET_OBJ                                                'bar'
   15     4      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/qGlU6
function name:  __get
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        FETCH_OBJ_W                                      $1      'wrapped'
          2        FETCH_OBJ_W                                      $2      $1, !0
          3      > RETURN_BY_REF                                            $2
   20     4*     > RETURN_BY_REF                                            null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGlU6
function name:  __set
number of ops:  6
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   24     2        FETCH_OBJ_W                                      $2      'wrapped'
          3        ASSIGN_OBJ                                               $2, !0
          4        OP_DATA                                                  !1
   25     5      > RETURN                                                   null

End of function __set

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGlU6
function name:  __isset
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   29     1        FETCH_OBJ_IS                                     ~1      'wrapped'
          2        ISSET_ISEMPTY_PROP_OBJ                           ~2      ~1, !0
          3      > RETURN                                                   ~2
   30     4*     > RETURN                                                   null

End of function __isset

Function __unset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qGlU6
function name:  __unset
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   34     1        FETCH_OBJ_UNSET                                  $1      'wrapped'
          2        UNSET_OBJ                                                $1, !0
   35     3      > RETURN                                                   null

End of function __unset

End of class FooProxy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.42 ms | 1390 KiB | 13 Q