3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $data = array( 'count' => 5 ); public function & __get($name) { return $this->data[$name]; } public function __set($name, $value) { $this->data[$name] = $value; } } $foo = new Foo; $foo->count += 1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KdWXe
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        ASSIGN_OBJ_OP                                 1          !0, 'count'
          4        OP_DATA                                                  1
          5      > RETURN                                                   1

Class Foo:
Function __get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/KdWXe
function name:  __get
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_W                                      $1      'data'
          2        FETCH_DIM_W                                      $2      $1, !0
          3      > RETURN_BY_REF                                            $2
   10     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/KdWXe
function name:  __set
number of ops:  6
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        FETCH_OBJ_W                                      $2      'data'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
   14     5      > RETURN                                                   null

End of function __set

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.26 ms | 1394 KiB | 13 Q