3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $foo; } class FooProxy extends Foo { public function __construct() { unset($this->foo); } public function __set($name, $value) { echo "set$name\n"; } public function __get($name) { echo "get$name\n"; } } $p = new FooProxy(); $p->foo = "bar"; echo $p->foo; $p = new FooProxy(); echo $p->foo; $p->foo = "bar";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iZXM5
function name:  (null)
number of ops:  15
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'FooProxy'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        ASSIGN_OBJ                                               !0, 'foo'
          4        OP_DATA                                                  'bar'
   28     5        FETCH_OBJ_R                                      ~5      !0, 'foo'
          6        ECHO                                                     ~5
   30     7        NEW                                              $6      'FooProxy'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $6
   31    10        FETCH_OBJ_R                                      ~9      !0, 'foo'
         11        ECHO                                                     ~9
   32    12        ASSIGN_OBJ                                               !0, 'foo'
         13        OP_DATA                                                  'bar'
         14      > 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/iZXM5
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   UNSET_OBJ                                                'foo'
   13     1      > RETURN                                                   null

End of function __construct

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iZXM5
function name:  __set
number of ops:  7
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        ROPE_INIT                                     3  ~3      'set'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '%0A'
          5        ECHO                                                     ~2
   18     6      > RETURN                                                   null

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iZXM5
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        ROPE_INIT                                     3  ~2      'get'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
   23     5      > RETURN                                                   null

End of function __get

End of class FooProxy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.23 ms | 1399 KiB | 13 Q