3v4l.org

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

Class A:
Function __get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/cjKV2
function name:  __get
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        FETCH_OBJ_W                                      $1      'v'
          2      > RETURN_BY_REF                                            $1
          3*     > 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/cjKV2
function name:  __set
number of ops:  5
compiled vars:  !0 = $name, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ASSIGN_OBJ                                               'v'
          3        OP_DATA                                                  !1
          4      > RETURN                                                   null

End of function __set

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.47 ms | 1395 KiB | 15 Q