3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {protected $a = 'A'; /*public function __get($f){ return 'field_'.$f; }*/} class B extends A {} class C extends A { public function foo() { $b = new B(); echo $b->a; } } $c = new C(); $c->foo();
based on f2rFd
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tiOC5
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  12     0  E >   NEW                                              $1      :7
         1        DO_FCALL                                      0          
         2        QM_ASSIGN                                                !0
  13     3        INIT_METHOD_CALL                                         !0, 'foo'
         4        DO_FCALL                                      0          
         5      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]
Class C:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tiOC5
function name:  foo
number of ops:  6
compiled vars:  !0 = $b
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   NEW                                              $1      :7
         1        DO_FCALL                                      0          
         2        QM_ASSIGN                                                !0
   8     3        FETCH_OBJ_R                                      ~4      !0, 'a'
         4        ASSIGN_OBJ                                               ~4
   9     5      > RETURN                                                   null

End of function foo

End of class C.

Generated using Vulcan Logic Dumper, using php 7.4.0