3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $as = 1; function a() {echo $this->as;} } class B extends A { protected $as = 2; function a() {echo $this->as;} function b() {parent::a();} function c() {$this->a();} function d() {echo parent::$as;} } $b = new B(); $b->a(); $b->b(); $b->c();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3TGX
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'a'
          4        DO_FCALL                                      0          
   16     5        INIT_METHOD_CALL                                         !0, 'b'
          6        DO_FCALL                                      0          
   17     7        INIT_METHOD_CALL                                         !0, 'c'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class A:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3TGX
function name:  a
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_OBJ_R                                      ~0      'as'
          1        ECHO                                                     ~0
          2      > RETURN                                                   null

End of function a

End of class A.

Class B:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3TGX
function name:  a
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'as'
          1        ECHO                                                     ~0
          2      > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3TGX
function name:  b
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'a'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   null

End of function b

Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3TGX
function name:  c
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_METHOD_CALL                                         'a'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   null

End of function c

Function d:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3TGX
function name:  d
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'as'
          1        ECHO                                                     ~0
          2      > RETURN                                                   null

End of function d

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.44 ms | 1403 KiB | 13 Q