3v4l.org

run code in 300+ PHP versions simultaneously
<?php class State { public function __get($arg) { ob_start(); debug_zval_dump($this); // e.g. "object(State)#1 (0) refcount(6)" return ob_get_clean()[29]; } } $obj = new State; var_dump($obj->state); $a = $obj; var_dump($obj->state);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PIMmG
function name:  (null)
number of ops:  13
compiled vars:  !0 = $obj, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $2      'State'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   11     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~5      !0, 'state'
          5        SEND_VAL                                                 ~5
          6        DO_ICALL                                                 
   12     7        ASSIGN                                                   !1, !0
   13     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~8      !0, 'state'
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class State:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PIMmG
function name:  __get
number of ops:  12
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'ob_start'
          2        DO_ICALL                                                 
    5     3        INIT_FCALL                                               'debug_zval_dump'
          4        FETCH_THIS                                       ~2      
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'ob_get_clean'
          8        DO_ICALL                                         $4      
          9        FETCH_DIM_R                                      ~5      $4, 29
         10      > RETURN                                                   ~5
    7    11*     > RETURN                                                   null

End of function __get

End of class State.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.3 ms | 1395 KiB | 21 Q