3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __get($v) { var_dump(get_called_class()); var_dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)); } public function doPr() { $this->bar; } } $foo = new Foo; $foo->bar; $foo->doPr();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZriQ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        FETCH_OBJ_R                                      ~4      !0, 'bar'
          4        FREE                                                     ~4
   21     5        INIT_METHOD_CALL                                         !0, 'doPr'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Foo:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZriQ
function name:  __get
number of ops:  12
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'var_dump'
          2        GET_CALLED_CLASS                                 ~1      
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    9     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'debug_backtrace'
          7        SEND_VAL                                                 2
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                                 
   11    11      > RETURN                                                   null

End of function __get

Function dopr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CZriQ
function name:  doPr
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'bar'
          1        FREE                                                     ~0
   15     2      > RETURN                                                   null

End of function dopr

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.86 ms | 1387 KiB | 17 Q