3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { protected $data = array('some' => array('sub' => 'data')); public function __set($name, $value) { $this->data[$name] = $value; } public function __get($name) { return $this->data[$name]; } } $my = new MyClass(); $my->some['sub'] = 'test'; // пытаемся изменить значение echo $my->some['sub']; // выведет 'data'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIBXa
function name:  (null)
number of ops:  10
compiled vars:  !0 = $my
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        FETCH_OBJ_W                                      $4      !0, 'some'
          4        ASSIGN_DIM                                               $4, 'sub'
          5        OP_DATA                                                  'test'
   17     6        FETCH_OBJ_R                                      ~6      !0, 'some'
          7        FETCH_DIM_R                                      ~7      ~6, 'sub'
          8        ECHO                                                     ~7
          9      > RETURN                                                   1

Class MyClass:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIBXa
function name:  __set
number of ops:  6
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        FETCH_OBJ_W                                      $2      'data'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
    7     5      > 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/UIBXa
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_R                                      ~1      'data'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function __get

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.11 ms | 1394 KiB | 13 Q