3v4l.org

run code in 500+ PHP versions simultaneously
<?php class ParentClass { public function method1(): string { return $this->protectedMethod1(); } protected function protectedMethod1(): string { return 'parent'; } } class ChildClass extends ParentClass { public function method1(): string { return parent::method1(); } protected function protectedMethod1(): string { return 'child'; } } $c = new ChildClass; var_dump($c->method1());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h0lYg
function name:  (null)
number of ops:  9
compiled vars:  !0 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   NEW                                                  $1      'ChildClass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   24     3        INIT_FCALL                                                   'var_dump'
          4        INIT_METHOD_CALL                                             !0, 'method1'
          5        DO_FCALL                                          0  $4      
          6        SEND_VAR                                                     $4
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

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

End of function method1

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

End of function protectedmethod1

End of class ParentClass.

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

End of function method1

Function protectedmethod1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h0lYg
function name:  protectedMethod1
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E > > RETURN                                                       'child'
   20     1*       VERIFY_RETURN_TYPE                                           
          2*     > RETURN                                                       null

End of function protectedmethod1

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
228.23 ms | 1967 KiB | 14 Q