3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public $d = []; public function __set($k,$v) { $this->d[$k] = $v; } public function __get($k) { return $this->d[$k]; } } $x = new x; ++$x->test; var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bjkJs
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        PRE_INC_OBJ                                              !0, 'test'
   12     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function __get

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.23 ms | 1400 KiB | 15 Q