3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function __get($p) { var_dump(array('get', $p)); } function __set($p, $v) { var_dump(array('set', $p, $v)); } } $x = new A(); var_dump(array('get blah', $x->blah)); var_dump(array('set blah', $x->blah = 4));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jRfMn
function name:  (null)
number of ops:  17
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'var_dump'
          4        INIT_ARRAY                                       ~4      'get+blah'
          5        FETCH_OBJ_R                                      ~5      !0, 'blah'
          6        ADD_ARRAY_ELEMENT                                ~4      ~5
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
   16     9        INIT_FCALL                                               'var_dump'
         10        INIT_ARRAY                                       ~7      'set+blah'
         11        ASSIGN_OBJ                                       ~8      !0, 'blah'
         12        OP_DATA                                                  4
         13        ADD_ARRAY_ELEMENT                                ~7      ~8
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class A:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jRfMn
function name:  __get
number of ops:  7
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_ARRAY                                       ~1      'get'
          3        ADD_ARRAY_ELEMENT                                ~1      !0
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
    6     6      > RETURN                                                   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/jRfMn
function name:  __set
number of ops:  9
compiled vars:  !0 = $p, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_FCALL                                               'var_dump'
          3        INIT_ARRAY                                       ~2      'set'
          4        ADD_ARRAY_ELEMENT                                ~2      !0
          5        ADD_ARRAY_ELEMENT                                ~2      !1
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   10     8      > RETURN                                                   null

End of function __set

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.9 ms | 1396 KiB | 15 Q