3v4l.org

run code in 300+ PHP versions simultaneously
<?php class parentClass { public function method1() {$this->method2();} } class childClass extends parentClass { protected function method2() {} } class grandChildClass extends childClass { public function method3() {$this->method2();} } $p = new parentClass; $p->method1(); $c = new childClass; $c->method1(); $g = new grandChildClass; $g->method1(); $g->method3();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pvT84
function name:  (null)
number of ops:  18
compiled vars:  !0 = $p, !1 = $c, !2 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $3      'parentClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   18     3        INIT_METHOD_CALL                                         !0, 'method1'
          4        DO_FCALL                                      0          
   20     5        NEW                                              $7      'childClass'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
   21     8        INIT_METHOD_CALL                                         !1, 'method1'
          9        DO_FCALL                                      0          
   23    10        NEW                                              $11     'grandChildClass'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $11
   24    13        INIT_METHOD_CALL                                         !2, 'method1'
         14        DO_FCALL                                      0          
   25    15        INIT_METHOD_CALL                                         !2, 'method3'
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

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

End of function method1

End of class parentClass.

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

End of function method2

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

End of function method1

End of class childClass.

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

End of function method3

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

End of function method2

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

End of function method1

End of class grandChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.79 ms | 1399 KiB | 13 Q