3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { protected $bar = array('baz'); function bar() { array_pop($this->bar); $vars = get_object_vars($this); print_r($vars); $this->bar[] = array('buz'); print_r($vars); } } $f = new foo(); $f->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dcPn6
function name:  (null)
number of ops:  6
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dcPn6
function name:  bar
number of ops:  19
compiled vars:  !0 = $vars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'array_pop'
          1        FETCH_OBJ_W                                      $1      'bar'
          2        SEND_REF                                                 $1
          3        DO_ICALL                                                 
   10     4        INIT_FCALL                                               'get_object_vars'
          5        FETCH_THIS                                       ~3      
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !0, $4
   11     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   12    12        FETCH_OBJ_W                                      $7      'bar'
         13        ASSIGN_DIM                                               $7
         14        OP_DATA                                                  <array>
   13    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
   14    18      > RETURN                                                   null

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.29 ms | 1400 KiB | 19 Q